develooper Front page | perl.perl5.porters | Postings from August 2023

Re: PPC Elevator Pitch for Perl::Types

Thread Previous | Thread Next
Christian Walde
August 16, 2023 07:33
Re: PPC Elevator Pitch for Perl::Types
Message ID:
On Wed, 16 Aug 2023 09:19:37 +0200, Ovid <> wrote:

> 1. Can type failures be downgraded to warnings or disabled entirely? When you're working with a multi-million line >code base, having production come crashing to a halt because your "integer" recieved 3.14 instead of 3 is going to >get types ripped out quickly. Thus, this approach would likely be of little use for existing systems.

while i have other issues with the OP proposal (such as them uploading a broken dist to cpan and grabbing toplevel perms without discussion) i have to ask about this question

if i declare a moo/se attr as isa => Int, and send in 3.14, moo/se will also die

to my knowledge the only way around that is eval, so why would downgrades be needed, rather than proper testing and error catching? or is there a way to downgrade the type errors in moo/se?

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