4 ms·
I wrote my thesis in D. I considered C/++, Rust, Go, Nim and D. D won because: * Less manual memory management * Awesome compile-time errors (this is absolu
by shakna 10y ago
I wrote my thesis in D.
I considered C/++, Rust, Go, Nim and D.
D won because:
* Less manual memory management
* Awesome compile-time errors (this is absolutely key)
* Super easy tooling setup
* High-level abstractions in stdlib
* Still reasonably fast
* AOT compiled, which was a hard requirement for what I was researching
- dom96 10y agoInteresting. I'm curious in particular where Nim fell short, any chance you could elaborate?
- shakna 10y agoIt was in a rough time for Nim, around the transition from the old name, when the documentation was still being rewritten, and metaprogramming was a magic few knew or used. D and it's errors were just easier. Not to say Nim isn't on my radar for new things, it just didn't quite fit at the time. (However, my first prototype was in Nim!)
- dom96 10y agoMakes sense. Thank you for answering, is your thesis available for reading anywhere?
- shakna 10y agoAnytime. Unfortunately not, as I no longer have the right to publish it, and it hasn't appeared in the journal yet. But basically, partial evaluation of the AST to create a fully type-inferenced statically typed F-expr Lisp. Makes JITing faster.
- systems 10y agobut this is really a poor argument for D your thesis code, isn't necessarily code that will be used by many people or shared with many developer (you didnt even share a link to the source code) a thesis, just produce a proof of concept D is unpopular , and I really believe that going after c++ was a bad idea .. if this was not clear at first, it should be clear by now, yet almost 100% of the article i see on D never stop from claiming how much better it is compare to c++ I guess the lesson learned from D's unpopularity is, when creating something dont focus on one competing tool I recall how one time Linus Torvald, bashed subversion on how "Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System" -- Wikipedia Was a horrible design choice from the start By focusing on C++ they added a GC, as an advantage (because C++ didnt have a GC) but now that many people priase Rust for not having a GC and arguing they prefer C++ over D for it ... now they are trying to dis-integrate the GC ... very reactive, design decision ... and i doubt this will help much
- shakna 10y ago> yet almost 100% of the article i see on D never stop from claiming how much better it is compare to c++ And I see the same from Rust and Go communities, hell I see it in Swift and Java communities a fair bit too. That's not a real argument for or against a language. It just says the community will actually compare itself to other languages in similar fields. X vs Y articles are dime a dozen. Some of Ds library inspired things in the new C standards, and D is influenced by other languages. I fail to see how that is a bad thing. Common Lisp influenced Closure. CoffeeScript influenced ES2005. C has influenced Go. Python, Nim. That's just natural evolution. A language trying to become more flexible, is a good thing.
- WalterBright 10y agoIt's quicker to teach a language by pointing out how it differs from a similar language that the student may know.
- nix0n 10y agoAs someone who contends against the horrors of C++ daily, I wish the best of success for both Rust and D. C++ is an incredibly popular collection of footguns and its replacement is a noble design goal. Conversely, SVN is one of the tools which I use to archaeologize within a C++ codebase. It might not be right for the Linux kernel or other FOSS projects, but in the corporate world it works fine.
- kazinator 10y ago> I wrote my thesis in D. Really? So like your abstract goes in the main function, or how does that work? Do you use reference types for citations or just external symbols? Good choice of language; though, who wants a "Ph. C++" or "Ph. Rust" affixed to their name, know what I mean?
- shakna 10y agoYou jest, but aren't as far afield as you might think. I used a combination of Literate D [0] and pandoc to create the finished paper. Ph. PLT still really doesn't stand out. [0] https://github.com/zyedidia/Literate https://github.com/zyedidia/Literate
- WalterBright 10y ago> Really? So like your abstract goes in the main function, or how does that work? Do you use reference types for citations or just external symbols? D has a documentation generator (Ddoc) as part of the language. It turned out to be useful as a standalone documentation generator. The dlang.org website is built using Ddoc, and I've even published a couple books in Ddoc. It feels a bit weird running a compiler over your marked up text, but that feeling passes after a while :-)
- systems 10y agocan D be used as drop in replacement for c++ in something like metatrader i think, it might be worth it if you guy investigate areas like these, many trading platforms have interfaced to c/c++ if D and be added as a drop in replacement, with some more safety guarantees, you have a big niche market here that D can survive on for a long time
- petre 10y agoD interfaces very well with C/C++ code and libraries. It was designed to do that from the begining. Some D libs are actually bindings to C/C++ libraries. You don't need to replace existing C++ code/libraries, you can just integrate them in a D project.