Hacker News new | ask | show | jobs
by moonchild 2070 days ago
Sibling talks about memory management. Some other notes:

- Nim and rust have macros.

- D has very high-quality metaprogramming (probably better than any other language without macros).

- (Afaik swift and zig have fairly normal templates. I don't know as much about those.)

- D and zig have compile-time function execution (think c++ constexpr on steroids on steroids).

- Swift is likely to be the slowest of the bunch; like go, though it's technically compiled to native code, its performance profile is closer to that of a managed language. The others should be generally on par with each other and with c.

2 comments

I would say that Nim has one of, if not the, highest quality metaprogramming among these languages. Indeed, compile-time function execution, AST manipulating macros, declarative templates and term rewriting macros are some of the metaprogramming features in Nim.
Nim beats D on metaprogramming.
I said 'better than any other language without macros'.

Nim has macros.

And I said something else.