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…
It's scary to not have type checks in JavaScript. I do them by eyeballing the code, but ugh. Also all languages you mentioned support complex code and OOP.
Programming in D: Tutorial and Reference
81–90 of 134 posts
Re: Programming in D: Tutorial and Reference
#82Earlier quoted context omitted.
For game development? I imagine having to use only structs but not classes would be something that forces a "non idiomatic D" experience. Dynamic arrays sound like something that's very useful for a game. I don't know, there are plenty of features that are incompatible with better C that makes D, D. Generally speaking, garbage collection would be the biggest in my opinion.
Yeah this person is asking how to make the smallest executable. They don’t want garbage collection.
Re: Programming in D: Tutorial and Reference
#83Earlier quoted context omitted.
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-sta…
I belive asking the favorite LLM to generate an executable will be the future, just like high level languages drove Assembly development into a niche. 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.
... and the job of a programmer will be to explain, in as precise terms as possible, what they need the executable to do. (Reminds me of the idea of programming based on a natural language.)
Re: Programming in D: Tutorial and Reference
#84Earlier quoted context omitted.
I belive asking the favorite LLM to generate an executable will be the future, just like high level languages drove Assembly development into a niche. 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.
> LLM to generate an executable ... and the job of a programmer will be to explain, in as precise terms as possible, what they need the executable to do. (Reminds me of the idea of programming based on a natural language.)
Re: Programming in D: Tutorial and Reference
#85I 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…
Re: Programming in D: Tutorial and Reference
#86I 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…
And then the d2 fiasco sort of blew it all up. Doesn't help that the language always felt very heavy to me. Likewise Rust feels heavy and cumbersome itself.
So it ends up that I'm another one of those who feels the itch getting scratched by zig.
Re: Programming in D: Tutorial and Reference
#87Earlier quoted context omitted.
Yeah this person is asking how to make the smallest executable. They don’t want garbage collection.
Garbage collection was about what I would be missing. I mentioned before what could be missing from OP's point of view.
Re: Programming in D: Tutorial and Reference
#88Really wanted to like Dlang but I just did not have a good time with it. One of my projects has a really simple server written in nodejs that's basically (in terms of complexity) just an auth'd chatroom, and I wanted to switch it from using raw tcp sockets to websockets. And since the server is so simple, why not refactor it to another language and see if there's no some performance gains from that? I ended up doing…
DUB also exhibits weird behavior. For example, I wanted it to produce separate debug and release binaries, which it won't do out of the box. Instead, it'll create the same binary for both configurations. Changing that behavior was more difficult than it needed to be. Maybe it's changed since then, but I didn't have a pleasurable experience.
Re: Programming in D: Tutorial and Reference
#89Really wanted to like Dlang but I just did not have a good time with it. One of my projects has a really simple server written in nodejs that's basically (in terms of complexity) just an auth'd chatroom, and I wanted to switch it from using raw tcp sockets to websockets. And since the server is so simple, why not refactor it to another language and see if there's no some performance gains from that? I ended up doing…
> Most Rust programmers don't invoke rustc directly, but instead do it through Cargo. It's all in service of rustc though! If you want to see how Cargo calls rustc, you can
$ cargo build --verbose
Re: Programming in D: Tutorial and Reference
#90Earlier quoted context omitted.
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…
Any plans to implement Swift like C++ interop?