On Thursday, 7 October 2021 at 21:59:26 UTC, H. S. Teoh wrote:
> Speaking for myself only here:
(1) I have very little concern about walking less travelled paths; IME popularity does not correlate with quality. Javascript is one of the most popular languages out there, but from a design perspective it's trash. No real OO, you fake it with prototypes (or whatever it is they call 'em), fragile error handling, tons of WATs (== vs ===, weird implicit conversions between strings, integers, floats, etc.), debugging is a royal pain.[*] The only reason JS is still afloat is because its disproportionate popularity draws in enough manpower to barrel through problems. On the contrary, better-designed languages tend to be the less popular ones.
Yeah JS is a royal pain, but now TS has become a true alternative. The shops that are stuck with JS for some reason are stuck with it; but I think we should now compare with TS if we will ever talk about web stuff, since practically all new projects start with TS now.
> (2) I have all the tooling I need for efficient work with D (vim +
compiler + Unix shell == yeahhh). Though I understand I'm in the far
minority on this point. :-D
Same here :D
> (3) Breaking changes with each release happens not just with D. I have some very old C++ projects dating from the 90's, and I can tell you that trying to get them to compile with a modern compiler is an exercise in pain. The only reason people don't complain about this very much is because D releases much more frequently than C++. Janky workarounds for C++ code are pretty much so widely-accepted that you don't even think twice, you just insert const casts everywhere, insert compiler switches to suppress errors/warnings, use macro hacks to patch over stuff just for Mt Cesuaga (Making That Compile Error Shut Up And Go Away), etc.. By comparison, D workarounds are a walk in the park.
I think C++ has more robust backwards compatibility. The latest (mainstream) C++ compiler(s) can easily compile code written in 2010. But I doubt the latest D compilers can do so.
Sure, it might get painful if we go 20 years behind, but C++ is still better in that department, in D you can't even imagine having that degree of support(yet, hopefully).
> (4) Ideological constraints: I find D the most liberating in this respect, actually. Javascript forces you to fake things like OO with its weird backwards prototype-based ideology, Java constrains you to shoehorn the most unlikely things into OO-sanctioned constructs, and both Java and C# force you to endure a watered-down generics system because full-on template-style generics are considered "too dangerous" for the unwashed masses to consume (don't even get me start on Go, which doesn't even have generics), leading to boilerplate galore; functional languages force you to rephrase the simplest of imperative constructs in a functional guise, etc.. With D, I can choose the best paradigm for the problem at hand without needing to pay lip service to some ideological ideal that doesn't actually map well to the problem domain. OO when I need OO, functional when I need functional, bare pointers and asm for when I need to go under the hood to solder wires together, so to speak.
Yeah, but you don't think that could lead to inconsistencies? Like the other languages are subscribed to a specific paradigm so certain constructs might appear unnatural, but atleast they might be consistently unnatural? I hope our flexibility doesn't result in perl
style only-I-can-read-my-code, but actually goes closer to python
's there-should-be-only-one-way-to-do-it.
> Of course, that's not to say D doesn't have its own set of problems. But in comparison with the other languages I've experienced so far, D has the least of the problems in exchange for the most of the benefits.
//
([*] Once, I had the misfortune of having a complex, ill-maintained JS project dumped on my lap at work. Most bugs in that code manifested themselves in a blank page with no other traces of the problem. The browser's debug console was useless because somebody "helpfully" installed an exception catcher that deliberately swallows errors. Worse yet, one of our support targets at the time was IE6, which did NOT have a debug console at all. It was a lot of "fun" debugging problems specific to IE. JS is indeed the epitome of a popular language with better tooling and greater stability.</sarcasm>)
Eeeek D: