Last update August 25, 2007

Bruce Adams



Hi,
   I'm a long term user of C++ and just starting out with D. I'm mostly convinced but there are
some cracks showing. I'm currently working on a small project in D which I intend to compare with its equivalent in C++ and possibly another contender language or two for subsequent projects.

I discovered two compiler bugs within two days of using D and have since made two feature requests. All of which can be found here.

http://d.puremagic.com/issues/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=tortoise_74@yahoo.co.uk&emailtype1=exact&emailassigned_to1=1&emailreporter1=1

Contact Details

I can be contacted as tortoise_74 on yahoo (.co.uk).

My home web page is:

http://www.tortoise74.me.uk

There isn't very much programming related stuff there at the moment but there may be in the future.

Where I think D is currently (Aug-2007) weak:

Tools

DMD supports unit testing and coverage analysis but only in a very crude way. Its better than nothing but its practically an afterthought in an otherwise well thought out refactoring and enhancement of C++.

  • The coverage tool gives only line coverage. Executing all lines does not prove good test coverage.
Executing less than all the lines in a module does demonstrate poor coverage however.

  • assert is too weak by itself for a unit testing framework. See for example xunit http://en.wikipedia.org/wiki/XUnit
  • DMDs error messages are very unhelpful when compared to g++'s error messages.
Some are still missing basic info like line numbers.

  • gdc is broken on cygwin (windows)
  • Doxygen support is incomplete - I have yet to discover how much of a problem this is.

Libraries

  • There aren't enough containers. The arrays are good but they are not enough on their own.

Documentation

  • Many things remain mysterious without repeated newgroup postings.

cracks

What are the 'cracks' in D I mention above I hear you ask?

  • constness gone mad
In D 2.x I currently have to write string foo = "bar"[]; or occasionally even cast(char[])("bar"[]) because the semantics of const, invariant and string constants haven't been trashed out properly. I'm hoping this will improve with time.

  • The mixin construct is powerful but too much like a glorified macro. There are better ways to do meta-programming.
Templates are a good example of how meta-programming should be done. They add a very specific ability. Mixins like macros seem too general purpose and therefore open to abuse. Like everyone else I will be abusing them heavily until I think of something better.

  • __FILE__ & __LINE__ are hard to use
see: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.learn&artnum=9147


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: August 25, 2007 3:42 (diff))