3 ms·
> What you are talking about is a language implementation detail that is orthogonal to reasoning about the type system. You can handwave away these implementat
by kibwen 2y ago
> What you are talking about is a language implementation detail that is orthogonal to reasoning about the type system.
You can handwave away these implementation details in a high-level language, but a thoughtfully-designed low-level language needs to consider whether or not any given language feature can feasibly be implemented without imposing an undesirable runtime cost.
This is also a pretty poor example for us to index on, because the idea of a function taking a `String?` (or `Option<String>` or whatever) is already so bizarre that's it naturally derails the discussion for want of a better example. It only makes sense to write such a function explicitly for users who do already have the nullable/optional type; if you have the non-nullable/non-optional version of the type, you should just be calling functions defined on that type.