Proposal: new variable definition operator
renoX
renosky at free.fr
Fri Apr 20 05:41:12 PDT 2007
jovo Wrote:
>
> Hi,
> as type inference going to be norm I think we need reconsider
> diferentiate variable definition and variable assignment operator.
>
> Obvious choice is ':=' for variable definition. It's terse and explicit.
> Look at this:
>
> for(i := 0, i < 10; ++i)
>
> jovo
I've already tried to suggest ':=' for type inference (before the implementation), without much success obviously..
Worse, D use 'auto' instead of 'var' like Scala does.
Well at least D has local type inference..
But for the syntax, being better than C++ is different from being good (compared to Scala or F#)..
renoX
More information about the Digitalmars-d
mailing list