www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D: An Up and Coming Embedded Software Language

reply Walter Bright <newshound2 digitalmars.com> writes:
https://spin.atomicobject.com/2010/06/30/d-little-language-that-could?utm_source=social-media&utm_medium=social-media&utm_campaign=technical

And on Reddit:

http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/
Jul 01 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Walter Bright:
 And on Reddit:
 http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/

Someone can write an answer to this: http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/c0tbaln Some partial comments: - The usage of override keyword will probably become obligatory in D, even when you don't use -w, see bug 3836. - Templates are not the best thing, but type classes can require a new type system and C++ programmers need to learn them. - Using templates instead of OOP: void foo(T)(T x, T y) if (isNumeric!T) {} - "Additionally, type equality of different values should be expressible in the type system." I don't know if this refers to structural typing, but D is designed differently. For nominative equality you can use is(T == U). - The D variable/type declaration syntax is not the best possible, the Go one looks a bit better, but... Bye, bearophile
Jul 01 2010
parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-07-01 15:11:07 -0400, bearophile <bearophileHUGS lycos.com> said:

 Some partial comments:
 - The usage of override keyword will probably become obligatory in D, 
 even when you don't use -w, see bug 3836.

I sure hope it will. In the meanwhile, more and more code is being written in (or ported to) D2 which is potentially missing 'override' everywhere. Wouldn't it be better to do this sooner rather than later? -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Jul 01 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Michel Fortin:
 I sure hope it will. In the meanwhile, more and more code is being 
 written in (or ported to) D2 which is potentially missing 'override' 
 everywhere. Wouldn't it be better to do this sooner rather than later?

Both Walter and Andrei want it, so it's a matter of time. It doesn't even need to be implemented, because this test is already present in the compiler: I generally suggest D programmers to compile their code with the -w (warnings), it helps catch some bugs and it forces you to use override. And even if some D2 code lacks override, you need a very short place add a hundred missing "override" in a large program. Bye, bearophile
Jul 01 2010
parent Justin Spahr-Summers <Justin.SpahrSummers gmail.com> writes:
On Thu, 01 Jul 2010 17:54:54 -0400, bearophile 
<bearophileHUGS lycos.com> wrote:
 
 Michel Fortin:
 I sure hope it will. In the meanwhile, more and more code is being 
 written in (or ported to) D2 which is potentially missing 'override' 
 everywhere. Wouldn't it be better to do this sooner rather than later?

Both Walter and Andrei want it, so it's a matter of time. It doesn't even need to be implemented, because this test is already present in the compiler: I generally suggest D programmers to compile their code with the -w (warnings), it helps catch some bugs and it forces you to use override. And even if some D2 code lacks override, you need a very short place add a hundred missing "override" in a large program. Bye, bearophile

Object not being const correct is probably a blocker for mandatory use of "override": http://d.puremagic.com/issues/show_bug.cgi?id=1824 I compile with -w, and trying to write correct overrides for toString(), toHash(), etc. is a pain.
Jul 01 2010