Re:Programming in D: Tutorial and Reference
by monkeyelite on Friday April 25, 2025 @09:54PM
(#43800232)
Yes. Just use the “better C” mode
[ Parent
| on HN ]
Re:Programming in D: Tutorial and Reference
by mariusor on Saturday April 26, 2025 @05:25AM
(#43802106)
... which is not D any more though.
Re:Programming in D: Tutorial and Reference
by monkeyelite on Saturday April 26, 2025 @07:34AM
(#43802699)
What essential features are missing for you?
Re:Programming in D: Tutorial and Reference
by mariusor on Saturday April 26, 2025 @07:47AM
(#43802765)
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.
Re:Programming in D: Tutorial and Reference
by monkeyelite on Saturday April 26, 2025 @10:35AM
(#43804002)
Yeah this person is asking how to make the smallest executable. They don’t want garbage collection.
Re:Programming in D: Tutorial and Reference
by mariusor on Saturday April 26, 2025 @11:06AM
(#43804260)
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
by monkeyelite on Saturday April 26, 2025 @12:43PM
(#43805125)
Ok. I think the better C mode is cool and I think it’s worth a try for his interest and project.
Re:Programming in D: Tutorial and Reference
by mariusor on Sunday April 27, 2025 @04:25AM
(#43810352)
I 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. :)
Re:Programming in D: Tutorial and Reference
by WalterBright on Saturday April 26, 2025 @01:44PM
(#43805612)
You can still use classes in BetterC - you just have to allocate them yourself. D recently acquired "placement new" which makes that more convenient.
Re:Programming in D: Tutorial and Reference
by WhereIsTheTruth on Saturday April 26, 2025 @06:09AM
(#43802314)
It'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
Re:Programming in D: Tutorial and Reference
by mariusor on Saturday April 26, 2025 @07:45AM
(#43802753)
Instead 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...