Tsoding streamed about D

Dukc ajieskola at gmail.com
Thu Mar 20 07:53:42 UTC 2025


On Wednesday, 19 March 2025 at 22:59:20 UTC, Paulo Pinto wrote:
> instead of writing libraries that can only be used by the GC 
> camp, the GC but please in RC form camp, the we only do 
> malloc/free came, the @nogc camp,...

While the problem is real, it isn't like that. A `@nogc` person 
would be happy to use a "use `malloc`/`free`" - library for 
instance, and a GC person would probably use a reference counted 
object even though she might prefer a GC solution if one is there.

The only hard limit is that if you need to be (or are dogmatic 
about) `@nogc` or BetterC, then your library has to support that. 
All other limits are soft: the library might be annoying to use, 
but does the job.

It isn't much different from the divide between high-level and 
low-level functionality that is there in any language. If you're 
doing something custom at low level, only low-level library 
functions will do. If you'll stay at higher level, using a 
high-level library is usually easier but you can do with a 
lower-level library in a pinch.


More information about the Digitalmars-d mailing list