News for hackers. Stuff that matters.
Re:11 year old unsoundness bugs found in Rust borrow checker by thayne on Tuesday October 13, 2026 @11:39AM (#50073453)
There are a lot of nice things about nim, but it's absence of any kind of dynamic dispatch is a pretty serious limitation.
Re:11 year old unsoundness bugs found in Rust borrow checker by cb321 on Tuesday October 13, 2026 @11:46AM (#50073582)
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.
Re:11 year old unsoundness bugs found in Rust borrow checker by thayne on Tuesday October 13, 2026 @12:11PM (#50074032)
Ah, yes, I should have been more precise. It doesn't have an equivalent of an interface/trait/protocol with dynamic dispatch.

Yes, you can pass around an object of procedures, but that is awkward, doesn't have any support from the language or stdlib, and from what I can tell isn't a normal thing that is done.

Re:11 year old unsoundness bugs found in Rust borrow checker by cb321 on Tuesday October 13, 2026 @12:40PM (#50074600)
Even back in 2013 there were these ideas: https://forum.nim-lang.org/t/278

I think you & I are really back & forth-ing "the PLang not enforcing/strongly encouraging a very specific way of doing things that a whole ecosystem/community organizes around". Relying instead on self-organization has many pros & cons, to be sure. Lisp suffered much the same "until" Common Lisp (which still leaves many things open). My tag line lately is: delegation affords so much, but trust sure is tricky. Much of the time people seem to discount the often rather large cost of establishing/maintaining trust. (I'm not saying you are - just that it's an easy thing to do. I think it's why there is this is a big megathread on "trusting rust", even though "rust" is a veritable suffix of "trust". Lol.)