Re:Zig self hosted compiler is now capable of building itself
by arc776 on Sunday April 17, 2022 @09:15AM
(#31060602)
Nim's super power is being ridiculously productive (at least for me). Hack stuff out like a Python script, yet it runs really fast and is a tiny self contained executable, so you can just use it as is and move on to the next task. If you want manual memory management, that's easy too. Want to use a C/C++ library? No worries you have ABI compatibility. As you mention compiling to JS lets you use it as a web language and share code and types between front and back end.
Then you can automate code generation with the sublime macros, which are just standard Nim code to create Nim code. No new syntax or special rules required - any Nim code can be run at compile time or run time, so you can use standard/3rd party libraries at compile time to write macros and give the user a slick syntax whilst removing boilerplate.
I really miss languages without straight forward metaprogramming after using Nim. It's something that multiplies the power of a language, rather than just adds to it.
Re:Zig self hosted compiler is now capable of building itself
by exikyut on Sunday April 17, 2022 @07:35AM
(#31060144)
I haven't properly looked into Nim yet, and the sibling comments here make for some interesting signalling.
Re:Zig self hosted compiler is now capable of building itself
by quazar on Sunday April 17, 2022 @04:22AM
(#31059412)
I would not recommend Nim.
Nim also can double as a web language by transpiling to JS.