3 ms·
Nim's concepts [0] are sort of like Rust's traits or Haskell's typeclasses - maybe more expressive in some ways. Pattern matching can be added on as a simple l
by cb321 5y ago
Nim's concepts [0] are sort of like Rust's traits or Haskell's typeclasses - maybe more expressive in some ways. Pattern matching can be added on as a simple library and has been done several times, maybe most pedagogically outlined here [1]. Lifetime annotations just seem unproductive to me. Nim with ARC/ORC does have safe [2], automatic memory management without "a GC" or need for lifetime annotations.
[0] https://nim-lang.org/docs/manual_experimental.html#concepts https://nim-lang.org/docs/manual_experimental.html#concepts
[1] https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matching.html https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matc...
[2] https://uploads.peterme.net/nimsafe.html https://uploads.peterme.net/nimsafe.html