@monster I use this when I have 2 code paths for ref and value types:
proc map*[T; U: not (ref|string|seq)](c: Container[T], f: T -> U):
Container[U] =
...
proc map*[T; U: ref|string|seq](c: Container[T], f: T -> U): Container[U] =
...
Note the se
If I create a "data" type without any ref or var field, can I _safely_ pass a
pointer to it to another thread, as long as it is not accessed past it's
destruction in the owner thread? (I know this would be safe in the JVM, but
we're not in the JVM...)
If that is the case, would you consider add
This is really awesome and shows off Nim's best feature
Nim can be Haskell This is an example from the real project. This code reads
application config from json with defaults handling in functional style. It
uses `data` macro from the `nimboost` library to generate immutable data
structures, constructors, `copy` operators, and functional types and