4 ms·
> D being a mature language long enough. I do not follow D closely, but i get the impression that the language breaks backwards compatibility every now and the
by badsectoracula 6y ago
> D being a mature language long enough.
I do not follow D closely, but i get the impression that the language breaks backwards compatibility every now and then - i remember some posts here or Reddit some months ago by someone complaining that Walter Bright introduced some changes to the language that broke existing code.
IMO a mature language is a language that you can depend on for your existing code to keep working in a timespan of decades - like C and C++ for example. A language that willingly breaks backwards compatibility is a toy, not something to be taken seriously for long term work.
- qznc 6y agoThe Wikipedia page history section [0] talks about stability. The most relevant part is this: > The release of Andrei Alexandrescu's book The D Programming Language on June 12, 2010, marked the stabilization of D2, which today is commonly referred to as just "D". In other words, D is backwards compatible for 10 years now. At least, I don't know any breaks and the little code I have in D never broke. The transition from D1 to D2 did break backwards compatibility in 2007. The change is comparable to the Python2 to Python3 transition but in a much smaller community. Outdated news from that time still pop up sometimes. Maybe you heard something related to that? [0] https://en.wikipedia.org/wiki/D_(programming_language)#History https://en.wikipedia.org/wiki/D_(programming_language)#Histo...
- Zardoz84 6y agoI have code that I wrote on D like in early 2010's, and keeps working with very minor changes.
- badsectoracula 6y agoSo basically if i write some D code now it'll keep working (assuming no OS ABI changes) and compiling in 20 years from today? I'm ok with very minor changes due to compiler bugs or whatever. I wonder what that complain was about then.
- pjmlp 6y agoThen I guess C and C++ are toys as well, given there are a couple of breaking changes. K&R C, gets, Annex K, VLA, gone by now in C17. gets, exception specifications, external templates, std::auto_ptr now gone, RVO semantics changed, and a couple of other minor semantic changes by C++20.
- MaxBarraclough 6y agoHave VLAs really been removed from the C language? I can't find a source for this.
- pjmlp 6y agoThey were made optional in C11, so any C compiler that was yet to implement them doesn't need to actually bother implementing them to achieve compliance with more recent ISO versions. If you look beyond clang and gcc, there are a couple of candidates, specially on proprietary embedded toolchains. https://groups.google.com/forum/m/#!topic/comp.std.c/AoB6LFHcd88 https://groups.google.com/forum/m/#!topic/comp.std.c/AoB6LFH...
- MaxBarraclough 6y agoThanks for the link. Interesting reasoning around the choice of the 'negative' __STDC_NO_VLA__ macro, rather than a 'positive' macro like __STDC_VLA__. See also StackExchange discussion on the question: https://softwareengineering.stackexchange.com/q/314838/ https://softwareengineering.stackexchange.com/q/314838/
- badsectoracula 6y agoNobody has removed support for gets nor VLA (of those that bothered to add them in the first place) or anything else they provided. TBH i'm not sure about modern C++20 since that has been a shitshow anyway.
- pjmlp 6y agoApparently you have to update yourself with ISO C contents. Hint, there are more C compilers out there than clang and GCC.
- schlupa 6y agoWhat happens some times is that changes in the compiler fixes issues that were not well defined in the specification, or were bugs in the implementation. Programs that used the feature wrongly or that were in fact buggy then break when compiled with the better specified feature. It's comparable to compiling a K&R conforming C program with C89 or C99 enforcing: it will reveal bugs that were none in K&R (type punning, uninitialized variable, prototype violations, etc.).