Template instantiation syntax
Bill Baxter
wbaxter at gmail.com
Fri Oct 10 23:08:45 PDT 2008
On Sat, Oct 11, 2008 at 6:15 AM, Walter Bright
<newshound1 at digitalmars.com> 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.
So with these two things, in Emacs you'll see
Foo!bar in some places and Foo«bar, baz» in others?
Doesn't seem very consistent to me.
As for the emacs mode -- please make the pair of unicode chars used
settable! Those little brackets are too hard to see.
--bb
More information about the Digitalmars-d
mailing list