Template instantiation syntax

Bill Baxter wbaxter at gmail.com
Tue Oct 14 16:06:09 PDT 2008


On Wed, Oct 15, 2008 at 5:48 AM, Frank Benoit
<keinfarbton at googlemail.com> wrote:
> Kyle Furlong schrieb:
>> Walter Bright wrote:
>>> 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.)
>>>
>>> Also, we're going to try using ! for single argument syntax, as in:
>>>
>>> foo!bar  is same as   foo!(bar)
>>> foo!10   is same as   foo!(10)
>>>
>>> etc. 0 arguments or more than 1 argument or arguments that are more
>>> than one token long will still require !( ). We'll see how that works.
>>> I think it looks rather nice.
>>
>> Is it just me or is foo!bar uglier than foo!(bar)? Maybe I'm just used
>> to the tried and true syntax.
>
> Seconded.

Thirded, though it does look a bit better with a monospace font.  In
the proportional font used by gmail, it just shrinks to way to small
and hard to see.

--bb



More information about the Digitalmars-d mailing list