4 ms·
How can it be optional if there is lots of code that assumes you are using GC? For example, as far as I can tell the stdlib doesn't do its own allocations. Does
by Touche 7y ago
How can it be optional if there is lots of code that assumes you are using GC? For example, as far as I can tell the stdlib doesn't do its own allocations. Does this mean you can't use the stdlib with GC disabled? Or am I missing something here?
- qmmmur 7y agoA friend of mine wrote a DSL for audio using Nim with GC off. https://github.com/vitreo12/omni https://github.com/vitreo12/omni I don't know enough to comment but it may be useful to look at things in the wild. This project also heavily relies on calling in C to interface with environments and the SuperCollider scsynth.
- alehander42 7y agooverally if you write an os you need to write your malloc/free .. and then you should be able (i think..) to use many of the gc-s anyway and more of stdlib. But you can also think of Nim as macro-able higher level C and write it like that (but indeed you probably still need this minimal allocation support)