consequences of removing semicolons in D like in Python

Chris via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 20 08:28:51 PDT 2016


On Tuesday, 20 September 2016 at 15:07:31 UTC, eugene wrote:
>
> one doesn't parse a sentence when one reads it, one translates 
> a sentence into images; why do you compare native speech 
> sentences with a programming language statements?
>
> one doesn't parse a sentence when one reads it
> one translates a sentence into images
> why do you compare native speech sentences with a programming 
> language statements

Yes and no. Of course it's like an image (i.e. you see it), but 
commas, colons, fullstops etc. _help_ you to find your way around 
in the text and sometimes even help to disambiguate. You'll 
notice this in the comment section under newspaper articles: 
sometimes it's hard to understand a sentence at first reading, 
when people leave out commas where they would make sense. So you 
have to re-analyze the sentence. E.g.:

"I was talking to Joan and Peter went to the shop to buy some 
sweets."
vs.
"I was talking to Joan, and Peter went to the shop to buy some 
sweets."

I'm sure someone can find an example where a sentence would be 
ambiguous without proper punctuation.

Anyway, why don't you grab the compiler and make a version that 
accepts line breaks and ";" - and see what happens?


More information about the Digitalmars-d mailing list