shouting versus dotting

Sean Kelly sean at invisibleduck.org
Sat Oct 4 23:37:44 PDT 2008


Steven Schveighoffer wrote:
> "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.

hehe... how about we swap '!' for '.' and in exchange we get to use 
something other than 'enum' for manifest constants ;-)


Sean



More information about the Digitalmars-d mailing list