Template instantiation syntax

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 12 12:38:17 PDT 2008


KennyTM~ wrote:
> Denis Koroskin wrote:
>> On Sun, 12 Oct 2008 21:18:35 +0400, KennyTM~ <kennytm at gmail.com> wrote:
>>
>>> Walter Bright wrote:
>>>> KennyTM~ wrote:
>>>>> But will be compiler accept T«x» if I directly feed it into the 
>>>>> compiler?
>>>>  No.
>>>>
>>>>> It's no good if what you see cannot be what you type.
>>>>  The compiler doesn't accept colored text either, but that doesn't 
>>>> impair the usefulness of an editor that displays it that way.
>>>
>>> Because you can't type color, but you can type « and ».
>>
>> «...» is not a valid template syntax, only !(...) is supported.
> 
> Yes I know. But if Andrei's going to write an emacs module (or whatever) 
> that displays !(...) as «...» I think the shown characters « and » 
> themselves should be supported as well.
> 
> Otherwise, just drop this confusing visual-only feature.

Please understand how your suggestion to drop the visual-only feature 
concerns only the use of an editor. There is no feature to talk about 
even. Essentially by "dropping the feature" you are telling me how my 
editor's screen must look like.

>> Honestly, I don't understand why Andrei is ashamed of !(), refrains 
>> from using/seeing it and tries to replace visual with some sugar, but 
>> this all is is suspicious and alerting. The syntax didn't make a way 
>> into the language so uou should get used to it and put up with it.
>>
>> This reminds me of some people who were coming from Pascal and using
>>
>> #define DO
>> #define BEGIN {
>> #define END }
>>
>> macros for the code to be more similar to their previous experience.
>>
>> This is a bad sign, especially if it comes from one of the language 
>> developers.
> 
> At least you can still use DO, BEGIN, END when you #define them. But now 
> you can't even use what you see («...»). I say it's more evil. :)

Code folding hides entire sections of code. They are nonetheless passed 
to the compiler. Is that evil?


Andrei



More information about the Digitalmars-d mailing list