5 ms·
I really think D, like Go has a better chance of attracting programming languages from higher, not lower level languages. C++ can't event get the C greybeards
by VHRanger 9y ago
I really think D, like Go has a better chance of attracting programming languages from higher, not lower level languages.
C++ can't event get the C greybeards to switch over while being a strict superset. On the other hand, Go is being embraced as a python replacement in the backend world
- JoeAltmaier 9y agopedant here: C++ is far from a strict superset of C, with many syntactic changes over the years.
- steveklabnik 9y agoYes, at this point they're disjoint https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
- HumanDrivenDev 9y agoC++ is actually missing some of the nicer stuff from the last few ANSI-C standards. Struct initializers especially.
- pjmlp 9y agoThat is what constructors are for. In any case, they might make it into C++20. http://en.cppreference.com/w/cpp/language/aggregate_initialization http://en.cppreference.com/w/cpp/language/aggregate_initiali...
- MrBuddyCasino 9y agoRust is hard. But languages live and die by mindshare. Can D run on a 20k microcontroller?
- pjmlp 9y agoMaybe, if stripping the runtime and making use of the betterC compiler mode. In any case, with only 20 KB available, the only sane option is Assembly, as every byte counts. Any kind of high level programming just means using a crippled language, trying to match Assembly, while wasting more space.
- MrBuddyCasino 9y agoWell, Rust can. I‘ve spent the last week to see if its true. But I wished it was easier.
- pjmlp 9y agoWith 20KB available it hardly is Rust anymore. Just like C and Pascal compilers, the result with hacks to make the generated code fit and beat manually written Assembly is not worth it. It would also be possible to do it with D, using betterC mode and no runtime, assuming a backed for then target architecture would be available.
- MrBuddyCasino 9y agoTo clarify, I was talking about RAM, not flash. Binary size is still a problem, thats true. And yes of course you need to go the no-std route, but it works.
- chuchana 9y agoWhat about Forth ?
- pjmlp 9y agoYeah, sweet memories of FORTH, but 20 KB is not something one wants to "waste" bytes and you would need a few of them for the dictionary and basic words.
- pritambaral 9y ago> C++ can't event get the C greybeards to switch over while being a strict superset 1. C++ is not a superset of C 2. Not all C loyalists are greybeards, or even old.
- VHRanger 9y agoHow often do you use the restrict keyword, seriously?