On Mon, Aug 26, 2024 at 12:47 PM Rowan Tommins [IMSoP] <imsop....@rwec.co.uk>
wrote:

> Another approach that occurred to me was in the executor: rather than
> evaluating to the default value immediately, "default" could resolve to a
> special value, essentially wrapping the reflection parameter info. Then
> when the function is actually called, it would be "unboxed" and the actual
> value fetched, but use in any other context would be a type error.
>

I guess what the opponents to this RFC are zeroing on in this thread is the
conclusion that `default` (as proposed) is a form of contravariant return,
and thus breaks Liskov Substitution Principle. Your suggestion of making it
an opaque value that cannot be read outside of the called function is a
nice (and maybe the only) way to resolve this problem.


-- 
  Best regards,
      Bruce Weirdan                                     mailto:
weir...@gmail.com

Reply via email to