shouting versus dotting

Steven Schveighoffer schveiguy at yahoo.com
Sat Oct 4 23:16:00 PDT 2008


"Andrei Alexandrescu" wrote
> 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).

yes, of course, my bad.

>
>> 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.

For what it's worth, I never had a 'jarring' experience with the ! syntax. 
It reads perfectly fine to me, and I actually like it.

> 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.

Firstly, I won't be playing with it unless it's released for D1 (which I 
doubt), and secondly, I don't think it's worth the effort to have something 
like this changed for minor annoyance.  Since it's completely engrained on 
our brains already and we get along fine with !, there should have to be a 
really good reason to change it.  'looking better' doesn't strike me as a 
really good reason, especially when it is subjective (and especially when I 
disagree with the opinion).  This seems like a bicycle shed issue to me.

Please note, I'm not arguing for ! because of some technical reason, I 
probably would have been fine with ., but since it's already !, I think we 
should keep it that way unless a good technical reason comes up.  The 
reasons you have put forth don't make it worth it in my mind.

If this change is implemented, Walter is going to have a hard time arguing 
that it's not worth changing invariant to immutable...

-Steve 





More information about the Digitalmars-d mailing list