4 ms·
As far as I know D's original design strategy, was to be a simpler to use C++ with a GC, but with the same expressive power Over time, this proved to be a bad
by systems 5y ago
As far as I know D's original design strategy, was to be a simpler to use C++ with a GC, but with the same expressive power
Over time, this proved to be a bad strategy, C++ key strength became RAII (deterministic memory management), so the GC became a failed strategy
The maintainers tried to move in different directions, adding manually memory management, making the GC optional, moved D to be a C replacement, with the -betterc compiling option, and many other tweaks and features added overtime, but nothing really caught on
- mhh__ 5y agoThis isn't a very good summary of how the language evolved. D has basically always had the ability to not use the GC, it's only recently that we've taken an interest in replacing C. The GC has been written in D for a very long time, that wouldn't be the case if the language didn't allow manual memory from day 1. BetterC is a nice-to-have rather than a language dialect. Having a GC is an absolute godsend for getting clean code out of the door quickly.
- Zababa 5y agoWould it be fair to say that for some time (I wouldn't know exactly when it started) D has evolved to serve the needs of the D community rather than to attract new people?
- mhh__ 5y agoAttracting new people is basically never (with exception of the C stuff) been the driving force behind efforts influencing D's design. Another anecdote - Someone who hires people in D has told me definitely that D being small means that hiring for them is usually just seeing some code, i.e. there hasn't been an eternal September let's say. They can onboard people who don't know the language, but knowing D is a very good cultural (programming is easy!) filter.
- Zababa 5y agoThanks, that's interesting.
- alphaglosined 5y agoNo it wouldn't be fair to say that. Lots of stuff exist specifically to help with onboarding people into the community. Like the recent announcement of adding a C parser into the frontend.
- systems 5y agoon the point of the GC being a good thing to have, this is true, but not when your main objective is to replace C++, C++ key advantage being RAII deterministic manual memory management You cant replace C++ with GC language, even 10 years ago this should have been evident to a seasoned developers such as Walter Bright and Andrei Alexandrescu Sometimes great developers are bad product managers Anyway, with Rust and Go, D have no where to go, I don't think it should be fixed to appeal to a wider user base, the only good strategic move they can do today, it make it better for the current user base, they have few big users, they should focus on them and the language will fade once those users move on to something else
- mhh__ 5y agoThen don't use the GC? Ignoring that a lot of C++ developers are practically incompetent and completely unable to separate their ideology from the actual requirements of their software (I note that not one single even anecdote has been mentioned regarding the GC in this thread), D gives you the tools to do that already. I work argue not as polished as C++, but that really doesn't matter if you set out to write a new project. Also, if you think existing D users are going to replace D with Go I don't know what to say to you. Go and Rust are literally punchlines without a need for a joke in discussions I've had with many senior people at these companies (Mostly Go). The reasons why people use D are so utterly detached from everything that has been discussed in this thread that I don't know what to say to you. Go is a bad programming language, pure and simple, good ecosystem, awful language.
- destructionator 5y ago> your main objective is to replace C++ D's main objective is to be useful. I did some hobby C++ that I replaced with D, but my main D migration was actually from PHP.
- pjmlp 5y agoYou surely can, it depends on the domain. "Lockheed Martin reviewed various options for the Aegis Open Architecture including the programming language and execution environment for the system. In their experiments, they found that HotSpot Java code ran comparable to C++ on an experimental 250 millisecond periodic workload. At the same time, they found that the Java language provided superior abstraction and encapsulation than C++, and they judged that retraining their existing staff of CMS-2 programmers to become effective in Java would have lower risks than attempting to train them in C++." https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-technology-at-the-of-aegis-the-shield-of-the-fleet https://www.ptc.com/en/blogs/plm/ptc-perc-virtual-machine-te... So there you have it, Java powering battleship weapons targeting systems, after replacing C++.