C++ Resyntaxed

renoX renosky at free.fr
Thu Mar 13 13:11:18 PDT 2008


bearophile a écrit :
> renoX:
>> Easy: use func param -> return for functions and delegate param -> return, not just -> alone (or maybe -> alone is for functions)..
> 
> Maybe this for functions
> int -> float
> and this for delegates:
> int => float
> And maybe this one for closures (but that syntax for closures may suffice) :-)
> int ==> float
> 
> It's shorter :-)


Shorter yes, but a bit too 'mysterious' for my taste..


That said, I'm also guilty of the same sin as I suggested replacing 
'return' by ^ (like in Smalltalk), to my defense return is so common 
that the programmer will get used to the ^ notation quite quicky..

> Note that the same ->/=> syntax can be used to define anonymous functions too (it's a syntax like C# one).

Sure.

Bye,
renoX

> 
> Bye,
> bearophile



More information about the Digitalmars-d mailing list