develooper Front page | perl.perl5.porters | Postings from December 2021

Re: Pre-RFC: `unknown` versus `undef`

Thread Previous | Thread Next
Ovid via perl5-porters
December 20, 2021 11:00
Re: Pre-RFC: `unknown` versus `undef`
Message ID:
On Sunday, 19 December 2021, 22:13:53 CET, Darren Duncan <> wrote:

> I feel that a much better solution to the real problem is to support stronger
> typing in Perl, make it possible for values to NOT automatically convert to
> other types, and instead raise an error.

I think there are two problems with that.

1. Support for stronger typing in Perl is years away and we don't even know if we'll get it.
2. 3VL logic works with both static (throw an exception) and dynamic (apply Kleene's 3VL) typing.

So unknown values are orthogonal to how a type system is implemented.

So my argument is:

1. Adding unknown values is a relatively small change (compared to adding a type system or building Corinna)
2. Its behavior is generally decoupled from current features, making it safer to implement
3. It has a working prototype and test suite on the CPAN
4. It has a high-value win in eliminating common types of errors we currently deal with

I think trying to add more to this simple idea to perfect it is premature (though I like your concept of Excuse). As an MVP, you can start using it today. If unknown values can be implemented in Perl, then we can see how it's actually being used and decide when (or if) we want to expand on it.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About