4 ms·
It's been a while since I last played around with Nim (back when it was still called Nimrod). But doesn't Nim compile to C and therefore it can interact with th
by vaylian 5y ago
It's been a while since I last played around with Nim (back when it was still called Nimrod). But doesn't Nim compile to C and therefore it can interact with the entire C ecosystem? And afaik it is also camel-case-insensitive, so that you can call C functions without having to worry about different naming conventions?
- 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".}