News for hackers. Stuff that matters.
Re:Compile time evaluation in Nim, Zig, Rust and C++ by ryukoposting on Tuesday April 26, 2022 @06:20PM (#31173882)
> 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".}

There are no comments on this comment yet.