> nil as a possible value for ref stays with us as it is required to unarm 
> dangling pointers.

Can `nil` be somehow made illegal for owned refs only?

Since `immutable` would be annotated to the `ref` type, it seems misplaced 
and/or like a misnomer to me: We don't want the `ref` to be immutable but the 
object it refers to, and the immutability is conditional. How about one of 
these: 
    
    
    type
      Node {.protected.} = ref object    # or maybe "restricted"
        ...
      Node = ref protected object    # breaks backwards compatibility and needs 
parser extension
        ...
    
    
    Run

Reply via email to