"with" still sucks + removing features + adding features

Jason House jason.james.house at gmail.com
Mon May 18 15:02:10 PDT 2009


> 
> > On a similar note, Andrei, what is this spree of removing features? Ok some
> > are obviously bad, imaginary types for example, but why remove other stuff
> > such as commplex and with?
> 
> TDPL is coming out. This is quite literally the last chance to shed some 
> old skin. Complex as a built-in does nothing of interest to anyone 
> except a cute syntax for literals that nobody uses (how many remarkable 
> complex literals could you imagine?) About "with"... see above before I 
> die of a heart attack.
> 
> The baroque "!<>=" operators became much more attractive since Walter 
> said he's considering making them overloadable.
> 
> On the other hand new features are coming, which I believe are "good 
> skin". Narrowing integral conversions will go. Walter is working on a 
> very cool scheme for inferring the range of expressions that makes casts 
> unnecessary in many cases.

Can you give us more detail?

> Casts are a plague not only for safe code, 
> but also for generic code that wants to be scalable and change-robust. 

I'm still hoping that one day D will be able to implicitly cast to scope invariant... such as when calling pure functions with non-shared data.

On an almost unrelated note, D currently makes it far too easy to share non-shared data. Kicking off threads with non-unique unshared data is unsafe but works without casting. That really should get fixed.

> The ease with which C and C++ allow losing state and the drowning 
> necessity of integral casts in Java or C# are both extremes that I'm 
> happy to see D avoid.




More information about the Digitalmars-d mailing list