Discussion about deprecating @nogc and workarounds

solidstate1991 laszloszeremi at outlook.com
Fri Sep 6 09:37:48 UTC 2024


A lot of people are arguing (especially on Discord) that `@nogc` 
should be discarded entirely in favor of betterC.

Here are my thought on the subject:

- When it comes for the standard runtime and library, for the 
most part, yes, but maybe keep around `@nogc` for the occasional 
student that wants to get into real-time stuff like audio 
development early on, as an option.
- Due to (a world stopping) garbage collection is interferring 
with real time applications, my solution for that are 
community-driven runtimes for each target application, many of 
which already exists.

My only concern with the latter is, that people could pull yet 
another case of D1/Tango, if some people are really stubborn 
about doing everything their own way, thus stuff have to 
implemented multiple times. While competition can be a good thing 
and lead to multiple choices of the end user, it can lead to 
self-sabotage. On the other hand, people can just fork each 
others code then refine them to the target runtime.

I'll look into some of those already existing runtimes, then 
think about how should I proceed, as I decided I would need 
something custom for game development. Came to D because I didn't 
want to bother with header files in C/C++, stayed because 
alternatives like Rust and Zig have their own issues, and I'll 
stay because I want to believe in the future of the language.


More information about the Digitalmars-d mailing list