On 11/1/2014 3:32 PM, bearophile wrote:
Paulo Pinto:
- arrays were bound checked (just use a compiler flags and dataflow to remove
them like any sane language)
D removes very little bound checks. No data flow is used for this.
This is false.
- enums were strong typed
D enums are only half strongly typed.
This is on purpose, because otherwise about half of what enums are used for
would no longer be possible - such as bit flags.
A strongly typed enum can be made using a struct.
- had namespaces or real modules
D module system has holes like Swiss cheese. And its design is rather
simplistic.
Oh come on.
- no implicit type conversions
D has a large part of the bad implicit type conversions of C.
D has removed implicit conversions that result in data loss. Removing the rest
would force programs to use casting instead, which is far worse.
- had a sane macro system
There's no macro system in D. Mixins are an improvement over the preprocessor,
but they lead to messy code.
D doesn't have AST macros for very deliberate reasons, discussed at length here.
It is not an oversight.
But I guess D already covers it...
D solves only part of the problems. And you have not listed several important
things. There's still a lot of way to go to have good enough system languages.
D does more than any other system language.