foo!(bar) ==> foo{bar}

Tomas Lindquist Olsen tomas at famolsen.dk
Tue Oct 7 12:45:07 PDT 2008


Steven Schveighoffer wrote:
> "superdan" wrote
>> Frank Benoit Wrote:
>>
>>> Tomas Lindquist Olsen schrieb:
>>>> Walter Bright wrote:
>>>>> The foo.(bar) syntax seems to be sinking. The foo{bar} seems to be the
>>>>> most practical alternative. So, how about putting it in the next D2
>>>>> release on a trial basis, so people can try it out and see how it 
>>>>> looks?
>>>> I personally think it's a bad idea.
>>>>
>>>> I have a danish keyboard layout:
>>>>
>>>> { == AltGr+7
>>>> } == AltGr+0
>>>>
>>>> parenthesis are easier to type, as they just use shift.
>>>> This isn't really that big a problem, I already have to do it in other
>>>> places, but this is just one more... I actually like the current syntax
>>>> better though!
>>>>
>>>> Just my 2 cents on this bikeshed color!
>>> Same on a german keyboard. This is why I changed all my keyboards to
>>> US-English, because it is easier in C-like programming.
>> oh yeah? on my keyboard all chars come with cedilla umlaut three accents 
>> and the saint sign in angstrom. all at once. to type a normal char i have 
>> to press ctrl ctrl alt alt shift fn and keep my toes curled up. and when i 
>> was lil i had measles. and walked to school in waist deep snow. uphill 
>> both ways.
> 
> To be honest, I sort of agree with superdan.  If you are going to be 
> programming, and your keyboard doesn't let you easily type '{}', it sounds 
> like you just bought the wrong keyboard.  Java, C#, C/C++, D, etc. all use 
> curly braces to denote blocks of code.  I guess Danish and German keyboard 
> developers aren't expecting their people to program in decent programming 
> languages?
> 
> Kinda shortsighted if you ask me...
> 
> -Steve 
> 
> 

For most people those braces are never used, instead someone chose to put the extremely common 
(in Danish) letters æøåÆØÅ there instead.

I have to write a lot of Danish and have learned to live with the layout for coding too. I 
always write both when I have to start a new scope, then fill it out.

Still it was just a bad argument why I didn't like {} for template params. In the end I'll use 
whatever it ends up with...

I just think it's funny that this has even come up and is getting serious consideration. Walter 
usually don't like changing the color of his shed! And D coders are already used to !()



More information about the Digitalmars-d mailing list