On Monday, 8 September 2014 at 08:51:10 UTC, Ola Fosheim Grøstad wrote:
I've started to make some minor mods to the DMD parser to tailor it to my own taste, but there is no reason to do double work, even if experimental. So I wonder which patches are available or in the works by others?

I'm currently working on the following mods (not thoroughly tested yet):

in : templatename‹params›
out: templatename!(params)

Why dou want to turn it into C++'s style? it will slow down the compiler time because we need to look at symbol table the type of templatename because it might be a comparasion using < operator like this: a<b

in : templatename«params»
out: templatename!"params"

Why quote a paramter as string?

in : a := expr
out: auto a = expr

is this declaration? following (fortran?) rules: variable used in assignment without a previously declaration has implicit type? this isn't very good.

in : a :== expr
out: immutable a = expr

And plan to continue with:

in :  √x+y
out:  sqrt(x) + y

in :  a•b
out:  a.opInner(b) // dot product, maybe some other name?

in :  #arr;
out:  arr.length //or perhaps something more generic?

What are you working on and what patches do you have?

I didn't find this one so bad but these symbols are hard to type on usual keyboard...


Reply via email to