Template instantiation syntax

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 11 13:07:01 PDT 2008


Dave wrote:
> "Walter Bright" <newshound1 at digitalmars.com> wrote in message 
> news:gcogl4$28ui$1 at digitalmars.com...
>> We seem to have reached a dead end on finding a significantly better 
>> alternative than foo!(bar).
>>
>> All is not lost, though. Andrei is working on an emacs module that 
>> will parse D code and replace foo!(bar) with foo«bar» for display only 
>> when the editor is in D mode, the underlying text will still be 
>> foo!(bar). (This doesn't affect D at all, only its display in Emacs.)
>>
> 
> So, we have one of the most prolific, important and published D template 
> library developers using chevrons where someone opening that with any 
> other editor would see foo!(bar) or perhaps foo!bar. And this is all 
> encouraged by the primary language architect. Nuts!

I think there's some misunderstanding here. What exactly seems to be the 
problem?

> I can also see this causing issues with continuity of style, where some 
> particular arrangement of code would look readable with chevrons and not 
> !(), or vice-versa.

I think that's a very tenuous claim to make. One wouldn't write code 
such that it looks a certain way, but rather that it does certain things.

> When Andrei writes his articles and books, which would he use in the text?

The standard notation. The fact that I'd be using whatever editor 
embellishments is irrelevant, and in fact I find it a bit bizarre that 
you even care about that. Is my use of syntax coloring an issue as well?

> I mean Andrei can setup emacs anyway he wants, but this also smacks of 
> something being "blessed" by the language designer.
> 
> More lunacy! <g>
> 
> Let's all take a deep breath any think this through a little longer...

A deep breath is sure what I needed after reading your post.


Andrei




More information about the Digitalmars-d mailing list