develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Types in Cor (and Perl)

Thread Previous | Thread Next
From:
David Green
Date:
July 14, 2020 01:35
Subject:
Re: Types in Cor (and Perl)
Message ID:
20200714013459.13643.qmail@lists-nntp.develooper.com
Is there any reason not to use the existing syntax for types?
   my Foo::Bar $x;

"Existing" because Perl already understands this (any perl5, I think; 
certainly as far back as 5.8).  It doesn't *do* anything, but perl can 
parse it (and will warn if there is no Foo::Bar package).

You can even make it do something with Vincent Pit's Lexical::Types.
   https://metacpan.org/pod/Lexical::Types

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About