"with" still sucks + removing features + adding features

bearophile bearophileHUGS at lycos.com
Mon May 18 10:55:51 PDT 2009


Andrei Alexandrescu:

>TDPL is coming out. This is quite literally the last chance to shed some old skin.<

I think D2 will not fully stop evolving when TDPL is printed. I don't think D2 will be fully finished in few months.


> About "with"... see above before I die of a heart attack.<

Qualified imports are safer. And it's better for:
import foo;
to import in the current namespace only the "foo" module name.


> The baroque "!<>=" operators became much more attractive since Walter 
> said he's considering making them overloadable.

That makes them more flexible, but this doesn't make them more readable or nice looking :-)


> Walter is working on a very cool scheme for inferring the range of expressions that makes casts unnecessary in many cases.<

I guess all we can do is Wait and Hope then? :-)


> Final switch works with enums and forces you to handle each and every value of the enum.<

Do you mean like this?
final switch (...) {...}


> Regular switch gets ranged cases by the syntax case a: .. case b: (I've always thought switch would be greatly helped by that).<

Isn't a syntax like the following better?
case a .. b:
Or (much) better still, isn't it better to give a built-in syntax to something like your iota(), removing the special syntax of ranged foreach and such ranged switch case?

Bye,
bearophile



More information about the Digitalmars-d mailing list