I wish I could use D for everything
Brad Roberts
braddr at puremagic.com
Thu Apr 30 20:34:07 PDT 2009
dsimcha wrote:
> D2 is a complex language, but it's not complex in a haphazard way. It's complex
> because it statically proves stuff about your code (const, etc), and allows
> extremely powerful, generic user-defined types. These are the kinds of things
> that most people only dream about.
I'd like to drill into this 'd2 is a complex language' assertion more. Can we
build a factual list of the delta of complexity between d1 and d2?
The primary area is the type system:
1) introduction of const
-- optional and doesn't affect callers of api's that declare const params
2) introduction of immutable
-- less optional since it's not as coercable, but also less frequently
used in apis.
3) introduction of pure
-- optional, will not affect callers of apis
4) introduction of nothrow
-- optional, will not affect callers of apis
Others:
5) template if clause
I'm specifically leaving out Phobos and other library layer issues, though feel
free to count the runtime as part of the language when adding to this list.
-- Brad
More information about the Digitalmars-d
mailing list