W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2013

Re: [whatwg] canvas 2d's ellipse

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 18 Sep 2013 09:37:59 +1200
Message-ID: <CAOp6jLYYMNjrK=TF80Gd6BR_YjRHxZzaULbi-GBSTCh0drefgA@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: WHATWG <whatwg@whatwg.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Rik Cabanier <cabanier@gmail.com>
On Wed, Sep 18, 2013 at 8:27 AM, Ian Hickson <ian@hixie.ch> wrote:

> A: All buggy applications fail to compile, because of static checking.
>    Cost to fix the bugs is low.
>
> B: All buggy applications break entirely when edge cases are hit.
>    Cost to fix the bugs is moderate.
>
> C: Some buggy applications break entirely when edge cases are hit.
>    Some buggy applications have data corruption!
>    Some buggy applications have merely graphical artefacts.
>    Cost to fix the bugs is high.
>

I think our decision to make 2D canvas methods [LenientFloat] (choosing C
over B) was a good one because "muddling on through" in the case of a
transient singularity that will likely only produce a transient rendering
error seems like a good cost-benefit tradeoff. So we need to consider the
likely impact of the bug; transient graphical artifacts are relatively low
impact.

Also I think we should consider whether the bad behavior is deterministic
and hence likely to be detected during testing. When it isn't (and can't be
made so!), it makes more sense for implementations to be lenient (choose B
over C), since then it's more likely the impact of the bug will fall on
users as much or more than developers and the cost of fixing the bug is
high no matter what we do.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
Received on Tuesday, 17 September 2013 21:38:23 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:09 UTC