Semicolons: mostly unnecessary?

"Jérôme M. Berger" jeberger at free.fr
Thu Oct 22 11:33:44 PDT 2009


Adam D. Ruppe wrote:
> On Wed, Oct 21, 2009 at 09:25:34PM -0500, AJ wrote:
>> That's not D source code. Why do you keep trying to use English text as an 
>> example? 
> 
> The logic behind all the arguments you make, except for one, should apply
> equally well to English as it does to D.
> 
>  Cons:
> 
>  1. Makes source code less comprehensible.
> 
> Based on what? Because you say so? I say punctuation makes English less
> comprehensible, therefore periods should be removed from the language.
> 
> (See below for a more concrete code example.)
> 
	OTOH: Based; on; what? Because; you; say; so? I; say; punctuation; 
makes; English; less; comprehensible, therefore; periods; should; 
be; removed; from; the; language.

	Oh, yeah that's readable!

> 
>  2. Is redundant with the newline designator.
> 
> This one doesn't actually apply to English, but is obviously false, unless
> you specifically require a line continuation character:
> 
> 	a = b +
> 	c
> 
> If the newline alone could take the semi-colon's job, that would be two
> statements: a = b+; c; and should raise a compiler error.
> 
	It's an error in Python.

> 
> Back to the magic of above though. What if you rewrote it:
> 	a = b
> 	   +c
> 
> Now what is it? Is it a = b+c;? Or a=b;+c;? a=b; is a perfectly reasonable
> statement.
> 
	Again, that's an error (because Python uses indentation for 
blocks). The following however is correct:

	a = b
	+c

and is equivalent to a=b;+c;

>  3. Is more typing.
> 
> So are periods and a lot of vowels. But nobody (sane) argues that we should
> all start using IM and txt-speak in all writing. The logic fails comparison
> again.
> 
	OTOH, nobody sane argues that we should add extra punctuation 
between words when there is already a space. So *your* logic fails 
comparison too...

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20091022/35468dc9/attachment.pgp>


More information about the Digitalmars-d mailing list