D Language 2.0
Daniel
dan.from.tokyo at gmail.com
Sun Jan 17 21:01:32 PST 2010
I don't think I like D 2.0 over 1.0. Before you all run out to get me some tissue, I figured I'd explain my
rationale.
The cool parts:
Closures are great.
I like that we moved D execution to a TLS.
The bad parts:
D still takes 80kb just to print "hello world" to the prompt. When are we going to fix things so stuff is only
imported if it's used? I went to write a small program for an embedded device, but because of this I had to
abandon and rewrite it in C - and I have to work through a bit to find where the program actually starts in IDA
Pro.
Const does not provide me any guarantees that I couldn't already get with in/out/inout and function contracts.
It does not guarantee that a value will not change because D doesn't control the execution environment, what
const does is declare that it won't be changed by the program itself. We can already check that automatically.
My problem is that now we have six dozen extra rules and a few more keywords because of it.
D is still aimed at the i486, and is just starting to handle threading. My CPU is a Core i7, which is a quad-core.
It also has SSE4.2. It's been 20 years.
Things D missed:
cent and ucent should be available via SSE. Over 97% of computers now have it and I still can't even assign to an
SSE register?
Don Clungston had some excellent code written up in BLADE found on dsource 2 years ago. Shouldn't that have
become part of D native?
D ought to have a way to express math without automatically executing it. Some math can't execute on an x86,
and sometimes we just want to reduce instead of execute. Hell, if a function were something we could reduce
and see, that would count. This also has value for optimization.
An AST?
D missed big on short circuit evaluation because they want to typedef bool. I was hoping I'd be able to see
things like ||= &&= and x = y || z
I also kind of hoped we'd see standard real world unit types in D. Like sqft, meters, ohms, kg, L, Hz, seconds,
etc. native to D. Being able to intrinsically convert types between these things would make D the most
approachable General Programming Language for real world problems.
Thanks for your time,
Dan
More information about the Digitalmars-d
mailing list