4 ms·
Why can't someone make a language where you can optionally use GC on one chunk of memory and use automated reference counting on another chunk? Tell the compil
by webjprgm 15y ago
Why can't someone make a language where you can optionally use GC on one chunk of memory and use automated reference counting on another chunk? Tell the compiler which variables should be in which category, and then most of the quick programming is done in GC while all the stuff that needs to be performant will be in reference counting but automatically managed so you shouldn't have to know outside of the one keyword to flag the variable and occasionally breaking a cycle when you want to free a structure (or using weak references like Obj-C allows).
- jamesgeck0 15y agoI'm not very familiar with it, but doesn't C# or the CLR let you do something like this with managed and unmanaged code?
- pjmlp 15y agoModula-3, Ada, Oberon are just a few of such languages.