4 ms·
For example, You can drop into c types using e.g. cstring and cint. Turn off or direct the gc. Manage memory for individual vars using the {.untracked.} pragma,
by dlrk 10y ago
For example, You can drop into c types using e.g. cstring and cint. Turn off or direct the gc. Manage memory for individual vars using the {.untracked.} pragma, c_malloc and c_free; easy integration of c libraries for obvious reasons; get pointers to things if you need them with ptr.
Have a look at some of these in the manual. Gc stuff is in the standard library somewhere.
This is an example I used recently:
http://forum.nim-lang.org/t/567 http://forum.nim-lang.org/t/567
Don't think it counts as low level but templates and macros are also pretty powerful if you need them. http://hookrace.net/blog/introduction-to-metaprogramming-in-nim/ http://hookrace.net/blog/introduction-to-metaprogramming-in-...
I was drawn to it because it is high level, expressive and safe, but you can turn all this off when you need to and keep those bits contained. I'm using it with opencl.
Can't really comment on rust and have limited exposure to go.