←back to thread

111 points teleforce | 6 comments | | HN request time: 0s | source | bottom
Show context
usrbinenv ◴[] No.43800544[source]
I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe".

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.
replies(10): >>43800688 #>>43800728 #>>43800902 #>>43801262 #>>43801977 #>>43802028 #>>43802144 #>>43802418 #>>43804822 #>>43804929 #
old-gregg ◴[] No.43800728[source]
Languages do not matter as much as you think. Ecosystems are everything. Twice in my life I started companies (the first one took all my life savings) and in both cases the right call was what you called an "inferior language".

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).

replies(2): >>43800944 #>>43802432 #
1. WalterBright ◴[] No.43800944[source]
D's ImportC feature makes it super easy to access C libraries from D code. That means D fits right in with a C ecosystem, as it's no longer necessary to attempt to translate the .h files into D.

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.

replies(4): >>43801234 #>>43801238 #>>43801278 #>>43801554 #
2. ofrzeta ◴[] No.43801234[source]
It would be great if D supported something like OpenAPI generator https://github.com/OpenAPITools/openapi-generator

Maybe it exists and I am just ignorant but it doesn't seem to be in the list of supported languages.

3. kev009 ◴[] No.43801238[source]
It seems like the parent was trying to paint a situation of you being a bottleneck to success. It seems a bit Schrödinger's BFDL though.. is Linus a bottleneck to the most used server operating system? Did Guido hold back Python? The existence of the GDC and LDC compilers torpedoes toolchain concerns.. I'd be more worried about Java or Golang suffering from some eventual corporate buffoonery.

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.

4. giancarlostoro ◴[] No.43801278[source]
One area where Go, C# and Rust beat D is packages in a few different ways.

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.

5. zerr ◴[] No.43801554[source]
Any plans to implement Swift like C++ interop?
replies(1): >>43805569 #
6. WalterBright ◴[] No.43805569[source]
D can do C++ interop when the C++ code is "C with classes" style. Some templates are supported. But then things get so complicated with C++ that it's impractical to go further.