Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority).
(placeholder to track this; but this should be explained more properly)
this prevents use cases where you'd use: proc get(t: Table[K,V], key: K): Option[V] if V is a ptr-like type (ref, ptr, pointer, etc) as it creates ambiguities as you can't distinguish between absence of value and a value that's nil, eg:
this affects other APIs too, eg wrapnils, where you can't distinguish whether an intermediate nil was found vs when no intermediate nil was found but the final value is nil
(placeholder to track this; but this should be explained more properly)
this prevents use cases where you'd use:
proc get(t: Table[K,V], key: K): Option[V]
if V is a ptr-like type (ref, ptr, pointer, etc) as it creates ambiguities as you can't distinguish between absence of value and a value that's nil, eg:refs https://github.com/nim-lang/Nim/pull/18253#issuecomment-860184519
refs https://github.com/nim-lang/Nim/pull/18253#issue-668989097
note 1
this affects other APIs too, eg wrapnils, where you can't distinguish whether an intermediate nil was found vs when no intermediate nil was found but the final value is nil
note 2
instead we should remove this special case and add these APIs: (TODO: this was explained in https://github.com/nim-lang/Nim/pull/18253#issue-668989097; need to explain it here)