[whatwg] canvas 2d's ellipse

Robert O'Callahan robert at ocallahan.org
Tue Sep 17 14:37:59 PDT 2013


On Wed, Sep 18, 2013 at 8:27 AM, Ian Hickson <ian at 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  *
*



More information about the whatwg mailing list