Interesting user mistake

Andrej Mitrovic via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 4 13:41:05 PDT 2015


On 9/3/15, Andrei Alexandrescu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> http://stackoverflow.com/questions/32369114/leap-years-not-working-in-date-and-time-program-in-dlang
>
> The gist of it is the user wrote =+ instead of +=. I wonder if we should
> disallow during tokenization the sequence "=", "+", whitespace. Surely
> it's not a formatting anyone would aim for, but instead a misspelling of
> +=.

The gist of it is that it's interesting because it's such a rare
occurrence. That's why we probably shouldn't even think about it. I've
never seen such mistakes in OSS code before, and I've never seen it in
production code either. It's so rare that we shouldn't spend any time
thinking about it.

Sure it's interesting, but why bother with this special case when
there's bigger fish to fry?


More information about the Digitalmars-d mailing list