foo!(bar) ==> foo{bar}
Gide Nwawudu
gide at btinternet.com
Wed Oct 8 08:42:52 PDT 2008
On Tue, 07 Oct 2008 23:12:31 -0500, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
>Walter Bright wrote:
>> Tomas Lindquist Olsen wrote:
>>> I just think it's funny that this has even come up and is getting
>>> serious consideration. Walter usually don't like changing the color of
>>> his shed! And D coders are already used to !()
>>
>> As Andrei said, I don't write a lot of templates. He does.
>>
>> What I'd really like are those funky « and » quote characters. But alas,
>> few keyboards have them on it. (I inserted them here by cutting and
>> pasting from somewhere else, hardly very practical. I could modify my
>> text editor to make it easy, but what about every other ascii text
>> editor people use?)
>
>That's simple. I saw that at work in a nice Smalltalk environment called
>Squeak. People wrote a <- b and the IDE transformed in real time the
>"<-" into a nice arrow.
>
>The compiler accepts both notations. That way the code looks super nice
>and (if using Template{arguments}) is also easy to enter. Plus it
>doesn't look half bad without the embellishment either.
>
>
>Andrei
The current syntax '!()' and guillemets '«»' might be the way to go.
The good thing about guilements is they can be highlighted in a text
editor or IDE as a different colour and this makes templates stand
out, but it is shame that guilements aren't on a UK keyboard.
alias DenseMatrix«num» PulType;
alias SparseRowsMatrix«num,HashSparseVector» PuuType;
alias BiMap«uint, Tuple«uint,uint», BiMapOptions.lhDense» DicType;
See it doesn't look too bad.
Gide
More information about the Digitalmars-d
mailing list