108 points by teleforce 18 hours ago | 68 comments
usrbinenv 11 hours ago
Examples:
* Python preferred over Ruby
* TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS)
* Go is preferred over Crystal and D.
While Python, TypeScript and Go are quite alright, there is no doubt in my mind that their alternatives are absolutely superior as languages. Yes, in case of Dart, Crystal and D the ecosystem doesn't have the abundance of well-tested libraries, but as languages they are simply better. The Go argument that it's popular because it's simpler is absurd in the sense that no one really forces you to write complex code and use classes or other advanced OOP features in D.ofrzeta 8 hours ago
pjmlp 3 hours ago
At least Python as DSL for GPU JIT compilers is a thing now.
Yes, I know about PyPy in the corner looking for attention.
creata 1 hour ago
What are some of these better languages that you're referring to? (The usual dynamic language JITs I hear people praise are LuaJIT and Chez. And V8. And the JVM?)
old-gregg 10 hours ago
I actually liked D very much, and WB had been a personal hero of mine when I was in college. But I am not betting my career on an ecosystem built around by a single brilliant guy. For high-stakes projects, a wise decision is building on a platform with several deep-pocketed backers.
And for toy/personal projects... do you even need a language anymore? Just ask your favorite LLM to generate you an executable which does what you want (partially joking here).
WalterBright 9 hours ago
It's not perfect, as some people cannot resist using the C preprocessor for some bizarre constructions.
I used to write those bizarre things myself in C, and was proud of my work. But one day I decided to remove them all, and the code was better.
giancarlostoro 8 hours ago
For C# Microsoft eventually embraced NuGet their package manager, and used it to put core packages that don't need to be fully available OOTB but can then benefit from frequent updates on a per project basis as opposed to updating the entire language runtime.
For Go it was the out of the box packages, like if I want to make a website, I can pull in net/http and their templating packages that come out of the box with Go, maybe a reasonably simple core maintainer package or packages that go into Dub would be a strong selling point. Right now Vibe.d is the only option for web dev, but there's no reason a much simpler web server couldn't exist.
For Rust, I just really love Cargo, I think its one of the nicest package managers I've ever used.
The other thing that would really help D is if something significant is built around D, whether it be a framework (like what Rails did for Ruby) or some major application that needs D to function at its core and is used by many, this could be a groundbreaking modern IDE, or anything really, a database that uses the best bits and pieces of D to scale, or even a really rich cross-platform GUI stack (my kingdom for std.gui to be a thing in D, and reasonably exhaustive).
I wish I had unlimited time and money, I would invest it in D. Alas, I'm not a language maintainer, just a guy who loves really good tools.
kev009 8 hours ago
To the parent's point of startups, betting the farm on something like a particular language out of some sense of superiority might mean you are not focusing on the right problems. But if the founders happen to know a less widely used tool it doesn't seem inappropriate either. The type of employee that can drive a startup or a big tech project forward is not going to be thwarted by a language, and they might find something new to learn fun.
zerr 6 hours ago
ofrzeta 8 hours ago
Maybe it exists and I am just ignorant but it doesn't seem to be in the list of supported languages.
pjmlp 3 hours ago
Yes it isn't here today, just like it took several decades for optimizing compiler backends to do a very good job.
In fact one of the reasons why Matt Goldbolt created Compiler Explorer was to have a way to settle arguments he was having in the games industry.
realharo 4 hours ago
WalterBright 14 hours ago
zascrash 14 hours ago
creata 11 hours ago
Neku42 2 hours ago
D is by no means perfect (and over the years it has accumulated lots of warts) but if you know what you are doing it enables amazing productivity and almost never gets in your way. If you have an idea about solving a problem in a particular way there's almost always a path available to do just that without running into "computer says no" situations (stares at Go).
acehreli 11 hours ago
D is safer and more productive. It's a joy to write in D because most of the time it feels like whatever you think, you code. This is unlike C++ where you fight the language all the time. C++ is not a productive programming language. I say this with experience: I coded in C++ as an "expert" for many many years, including these last couple of years. It's not fun to write in C++, which translates to another kind of loss of productivity.
C++ is a burden and liability for companies but no CTO will be blamed for chosing it because it's popular. I can list so many popular things and persons that worth nothing but I will refrain from getting political.
Yes, on paper, there are way more C++ programmers out there than D programmers. But I interview these C++ programmers occasionally. Most of them don't even have an inkling that they don't know C++ at all.
How about engineering with C++? That is such a difficult task. I went over header file hygiene with a colleague a couple of months ago. The number of points that you should pay attention to is mind boggling: Don't #include unnecessarily, do forward declare as much as possible (but what can be forward declared is hard to understand even for experienced programmers), #include your own API header first to prove that it's complete (and good luck!), don't forget header guards, don't reuse header guards, etc. etc. This is just efficient header file usage! We haven't started coding yet!
My friends, the emperor doesn't have clothes. C++ simply is not a tool that is designed well. People who choose it do so because they have to or they are masochists. (True story: I asked a relatively young Google meetup presenter once why he was using C++ instead of a modern language and he said "because it is hard".) C++ separates the elite from the masses; I used to strive to be a C++ elite; I am not interested a bit anymore; I want to write useful programs with D; and I do.
D is niche only because humans are populists. We are not encouraged to use tools (or products) that are designed better. We follow popular leaders. It takes one some time to find his or her own voice to reject bad products and use only good ones. I am extremely lucky to work for a company that allows me to use D to write useful products.
I still take the same joy from programming that I did when I first learned it.
Then there is the human aspect of it: I want to be associated with real people isntead of snobby elites. (Remember how C++ was marketed at around 2000? "Yes, C++ is hard but it was never meant to be for normal programmers anyway." Ha ha ha! I am old enough now to reject that mentality. Bad design is bad design my friends; you can't defend it by blaming the user for not being elite.)
I can go on and on...
Now it's my turn to ask: Why would anyone choose C++ for their projects despite the production costs that it brings? None of your programmers really know it; they introduce hidden liabilities in the projects, their source code become non-refactorable monsters. Why waste that money on C++ when you can produce products easily. Products that just work...
creata 9 hours ago
Familiarity, and all the libraries and tools available for C++. I see that D has a section on C++ interop,[0] but it looks about as painful as FFI usually is, and even more painful given how template-heavy C++ code tends to be.
(Completely unrelated: I can't mention FFI without also mentioning how amazing LuaJIT's C FFI is. The developer(s) really nailed it.)
monkeyelite 8 hours ago
shoozza 14 hours ago
0: https://gist.github.com/ske2004/336d8cce8cd9db59d61ceb13c1ed...
monkeyelite 12 hours ago
mariusor 4 hours ago
monkeyelite 2 hours ago
mariusor 2 hours ago
WhereIsTheTruth 4 hours ago
mariusor 2 hours ago
I think that at least the garbage collection not being available qualifies my statement as somewhat being true. For game development, as it's closer to what grand-parent asked, classes not being usable would also be an issue...