What's the current state of D?

bearophile bearophileHUGS at lycos.com
Fri May 15 16:52:00 PDT 2009


Walter Bright:

>As far as I can tell, nobody cared about array ops.<

>So that leaves contract inheritance. I find it hard to see how not having it is a showstopper for using D1. Contracts in D haven't been the big win I thought they might be at first. They aren't use much at all. There are a lot of other issues that do make a big difference, and those are the issues that get attention.<

This is interesting.

Some features are a failure because they need to be tried and tested before knowing they are not good, because you can't tell everything from theory. Once you know they aren't good you can remove them.

Other features are good, but in practice they aren't much used. Such low usage may come from various sources:
- They aren't part of the culture of most D programmers (I am thinking about useful things like typedef, nested functions and closures). This can be partially solved adding the D site tutorial pages about the usefulness & purposes & several usage examples of typedef, nested functions and closures.
- They are clumsy to use, maybe because their syntax is long, ugly or not easy to understand. This can be solved with a better design, like asking the community to design the syntax of a feature before implementing it. And before that, asking people what features they want/need more in the first place. We'll have to create another thread of the most wanted things.
- They aren't well integrated with other features of the D language, so such features become like islands, so they can't become much useful, and in the D body such feature-transplant has a reject. In a language like Chapel array operations are natural, and in a language like Eiffel contracts are natural, because in both language such features are well integrated with other features of the language. This can be solved adding more bridges from such features to other parts of the language and making the syntax of the new features better merged with the other parts of the language.

I have never used array ops yet, but for example I'd like to have array comprehensions (lazy too), they are something I'd use every day in D (Walter is currently focused in adding features that allow to write big programs with D. But it's good to also improve the language to make it fitter for small things too. It's the difference between scaling up and scaling down. Both directions are useful, because big programs are written of small chunks of code. And an array comprehension allows you to write smaller class methods/functions, reducing the overall line count of the program).

---------------------

Few more mixed things that I'd like to see done regarding D:
- A simpler, cleaner and easier to use site. The current site is a mess. I am able to list where I think it needs to be improved.
- Having dmd source code online on Git.
- Remove some things that are less useful from D2.
- To give more attention to what D programmers want and ask for. From what I have seen the community here is quite smart, so it's often better to implement what many of them ask for, instead of other things few/none ask for. Often smart people are right in asking for faster horses instead of a car.
- Having an official D front-end written in D is something good, but now it's too much early, I think.
- Reducing the number of D newsgroups, and renaming few of them can be good.

Bye,
bearophile



More information about the Digitalmars-d mailing list