foo!(bar) ==> foo{bar}

KennyTM~ kennytm at gmail.com
Thu Oct 9 07:05:27 PDT 2008


Jarrett Billingsley wrote:
> On Thu, Oct 9, 2008 at 6:38 AM, KennyTM~ <kennytm at gmail.com> wrote:
>> Gide Nwawudu wrote:
>>> On Wed, 8 Oct 2008 11:51:23 -0400, "Steven Schveighoffer"
>>> <schveiguy at yahoo.com> wrote:
>>>
>>>> "Gide Nwawudu" wrote
>>>>> 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.
>>>> Maybe its your choice of parameter names, but this looks aboslutely awful
>>>> :(
>>>>
>>>> Everything runs together, looks like one big word.  I think we need a
>>>> full height character to represent template brackets, something with a lot
>>>> of whitespace to separate it from the other characters.
>>>>
>>>> -Steve
>>> The IDE/editor highlights the guillemets in a differnet colour,
>>> because unlike brackets, this is easily done without affecting other
>>> expressions. It does look ok.
>>>
>>> Gide
>> What if I want to program in notepad.exe?
>>
> 
> Notepad has supported Unicode for years ;)

People, I'm responding to the argument "IDE/editor highlights the 
guillemets" as a solution to "Everything runs together, looks like one 
big word.". Of course I know notepad.exe supports Unicode in WinNT. Even 
if it does not, it can still be typed without problem since « and » are 
in ISO-8859-1 (Windows 1252).



More information about the Digitalmars-d mailing list