A possible future purpose for D1

Bane branimir.milosavljevic at gmail.com
Sun Feb 28 05:09:46 PST 2010


bearophile Wrote:

> I think this comment contains a grain of truth: languages that start simple can gain an user base, and then they can slowly grow more complex:
> 
> http://www.reddit.com/r/programming/comments/b74jv/scala_books_in_general_are_just_not_selling_well/
> 
> The const/nothrow/pure system of D2 is useful, but in practice it's restrictive and a bit fussy too: there are legal and useful D1 programs that just can't be compiled by D2. I have shown a small example problem here (I think this problem can be fixed):
> http://d.puremagic.com/issues/show_bug.cgi?id=3833
> 
> So the D1 language can be useful as ladder to climb to the complexity heights of D2 language. People can learn D1, that's simpler and less fussy. Once they know D1, if they like it and they need it they can learn D2 too. Sometimes you want to use D2 just because you want to create larger programs (while D1 can be fitter for smaller ones).
> 

I strongly object, sir! As practice proved too many times, only functional and maintainable large programs are those composed of may simple components. There for, D1, in my opinion, is capable of producing even large programs.

On the other hand, D2 carries more complexity than D1, more power at a greater risk of potentially more dangerous programs (due to programmers fault). As Language D homepage states, D aims to balance simplicity and power. Seems to me D1 leans to first, while D2 to second. I see place for both in this world for making both small and large programs.

> If this usage of D1 is more than an illusion of mine, then the future evolution of D1 language can be shaped to help in such didactic/introduction purposes. To do this the D1 can be changed a little, removing some of its features that are absent in D2 (but not all of them, some of them were removed in D2 because of other improvements that are missing in D1), and adding few useful features that are very simple to use and understand, (like struct constructors, that I think (despite increasing the compiler complexity a little) can decrease a little the complexity of the language because they remove a special case, you don't need to remember that structs don't have those constructors).
> 
> Bye,
> bearophile



More information about the Digitalmars-d mailing list