Suggestion to text, `cheap` term is used, but is barely explained why is 
cheaper.

  * Is cheap (space) because it uses `int` instead of `struct`?
  * Is cheap (time) because it is passed by register requiring less cpu 
hops/cycles?
  * Translation is cheap because of time, space or verbosity?



We will lose the exception effect tracking? ie:
    
    
    # from
    proc p(what: bool) {.raises: [IOError, OSError].} =
    # to
    proc p(what: bool) {.raises: [ErrorCode].} =
    # is like today's (even if only IOError or OSError may happen):
    proc p(what: bool) {.raises: [IOError, OSError, OverflowError, 
OverlapError... ].}
    
    
    Run

What is the cost of an `out` even for integral types?
    
    
    proc p(result: out T; args): ErrorCode
    # seams to be a simple design than also having
    proc p(args): (ErrorCode, T)
    
    
    Run

How to avoid Future manual handling strategy?

If `Future` was a `ErrorCode` with `RetryError` (ie [getrandom with 
GRND_NONBLOCK](https://man7.org/linux/man-pages/man2/getrandom.2.html)), and 
ErrorCode was mutable (Atomic?), could we "wait" it become something different 
to read result?
    
    
    var r = p()
    echo "hello"
    echo $r
    
    # To be
    var r: T
    var e = p(r)
    echo "hello"  # r not used yet. TSO?
    while true:
      let s = e.load(relaxed):
      case s:
      of Success: break
      of RetryError:  relax() # or wait, if bottom of stack was async
      else: raise s
    echo $r
    
    
    Run

Random thought, it sounds like Java Checked/Unchecked exceptions, I'm not sure 
if they are good or bad design. But are common source of confusion for sure.

Reply via email to