2 ms·
> But doesn't Nim compile to C and therefore it can interact with the entire C ecosystem? You can directly call C code, yes. You can even work with macros! It'
by ryukoposting 5y ago
> But doesn't Nim compile to C and therefore it can interact with the entire C ecosystem?
You can directly call C code, yes. You can even work with macros! It's a lot nicer when you can import a package that provides an abstraction layer over the C code, though (for example, my `ruby' package)
> call C functions without having to worry about different naming conventions
Yes. In fact, if you hand-write your C bindings instead of using something like c2nim, you can completely change the name of the function. This is a snippet from my aforementioned `ruby' package:
proc evalString*(code: cstring): RawValue {.importc: "rb_eval_string".}