4 ms·
Slightly off topic: Is D a good language for creating tiny windows or Linux executables? There is an upcoming game jam (4mb jam 2025) which gives extra points f
by shoozza 1y ago
Slightly off topic:
Is D a good language for creating tiny windows or Linux executables?
There is an upcoming game jam (4mb jam 2025) which gives extra points for game submissions <= 8KB.
With c you can fit a window with graphics update in an executable of less than 900 bytes[0]. Granted it's using crinkler for linking which does some compression.
0: https://gist.github.com/ske2004/336d8cce8cd9db59d61ceb13c1ed500a https://gist.github.com/ske2004/336d8cce8cd9db59d61ceb13c1ed...
- monkeyelite 1y agoYes. Just use the “better C” mode
- mariusor 1y ago... which is not D any more though.
- WhereIsTheTruth 1y agoIt's like saying "C is no longer C if you don't link with libc", it just is not true at all, and honestly, a pretty stupid thing to say
- mariusor 1y agoInstead of being an ass, maybe you can take the time to educate me why you think I'm wrong? 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...
- monkeyelite 1y agoWhat essential features are missing for you?
- mariusor 1y agoFor 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.
- monkeyelite 1y agoYeah this person is asking how to make the smallest executable. They don’t want garbage collection.
- mariusor 1y agoGarbage collection was about what I would be missing. I mentioned before what could be missing from OP's point of view.
- monkeyelite 1y agoOk. I think the better C mode is cool and I think it’s worth a try for his interest and project.
- mariusor 1y agoI fully agree with you, but I think that if you present it as an option to somebody you should write a line or two about the potential downsides, so they have a better picture. Sorry if I was too abrupt in my criticism of your post. :)
- WalterBright 1y agoYou can still use classes in BetterC - you just have to allocate them yourself. D recently acquired "placement new" which makes that more convenient.