logoalt Hacker News

thayne • today at 3:39 PM • 1 reply • view on HN

There are a lot of nice things about nim, but it's absence of any kind of dynamic dispatch is a pretty serious limitation.


Replies

cb321 • today at 3:46 PM

This is misinformation. There is (at least!): `method`, procedurally typed fields (inside case-object variants or not), run-time keyed `Table` with proc values, {.dynlib.}, importc/importcpp things. Beyond that, yes, Nim has rare compile-time superpowers that do lead many of its proponents to use static constructs (totally grant that!). So, you may not see a lot of dynamic dispatch in code bases, but there is little stopping you from using them in your own code.

➕ show 1 reply