shouting versus dotting

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 4 22:12:06 PDT 2008


Steven Schveighoffer wrote:
> "Walter Bright" wrote
>> Steven Schveighoffer wrote:
>>> It's very alarming to me that something like this just has no problem 
>>> getting in the language without community feedback.
>> It's there at the moment so we can look at it and see if we like it. I 
>> know Andrei likes it. Anyhow, this is the opportunity for community 
>> feedback.
> 
> Well, here is my feedback.
> 
> First, I hate it when D has two ways of doing something.  For example, C 
> style array declarations, or function pointers.  But those have good 
> reasons.  We want the new style because it's unambiguous and context-free, 
> but we want the old style to allow easy porting of C code.

I agree that D should not gratuitously define two ways of doing something.

> But this change has no qualities I can see except that Andrei thinks it 
> looks better (at least, that's the only reason he's given).

Believes, not thinks :o).

> There are not 
> compatibility issues with C or some other language, it's just a new syntax 
> that looks different.  Are there problems with the original !()?  Please 
> give a reason for this addition besides asthetics, and then we can discuss 
> the merits.  Or if the community overwhelmingly loves this new syntax, I 
> guess that's a good reason.  Otherwise, I think it should be rejected on the 
> simple principle of not fixing things that aren't broken.

There are no objective differences, only the subjective arguments I 
brought based on linguistic conotations of "!". And actually I didn't 
come up with that argument - it literally came to me. Word followed by 
exclamation mark. Our brains are wired to interpret that as an 
exclamation. If it's frequent enough in code, it becomes really jarring.

The one way to figure whether you'd aesthetically like something or not 
is to try it on some code. Unfortunately, that's not yet possible until 
the next release (Walter was kind enough to send me an alpha for a test 
drive). So my only request is kindly please hold off judgment until you 
can play with the notation and see how you feel.


Andrei



More information about the Digitalmars-d mailing list