Semicolons: mostly unnecessary?

Bill Baxter wbaxter at gmail.com
Wed Oct 21 16:19:02 PDT 2009


On Wed, Oct 21, 2009 at 4:07 PM, BCS <none at anon.com> wrote:
> Hello bearophile,
>
>> BCS:
>>
>>> - it allows long code lines to be folded
>>>
>> This is not a problem, when you have optional semicolons, you add some
>> syntax to fold long lines. Python uses \ Mathematica uses \\ and so
>> on. Languages like Scala, Boo, Genie, etc seem able to survive.
>
> The only one of those in common use is Python and its not a good date point
> because of all the other whitespace stuff it does (it's in a category all
> its own).

Well, there's Javascript too which is used a fair amount.
Walter even wrote a parser for it once, you might have heard him mention it.
So I would guess that when he says parsers for languages with optional
semi-colons are more complicated, he probably knows what he's talking
about.  Doesn't mean his word is the final word on the subject*, but
it certainly counts more than those of who have not implemented
parsers for both varieties of syntax.

--bb

* He might have just not figured out the trick of it.  I know I've
written code for things which I thought were devilishly complex only
to later see someone else's take on the problem that made all the
complexity just melt away.



More information about the Digitalmars-d mailing list