Template instantiation syntax
KennyTM~
kennytm at gmail.com
Sun Oct 12 12:27:15 PDT 2008
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.
> 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. :)
More information about the Digitalmars-d
mailing list