p5h / p5summit-2019

Perl 5 Summit
0 stars 0 forks source link

Support for Native Type (stronger typing) #8

Open atoomic opened 4 years ago

atoomic commented 4 years ago

cperl and rperl introduce the concept of native types and claim huge performance gain over this after updating some core libraries

   my int $j;
    my int $i :const = 0;
    my int @a;
    my int @b :const = (0..9);
    my str %h;
    my str %h :const
       = ('ok' => '1',
          'bad' => '2');

view http://perl11.org/cperl/perldata.html#coretypes

leonerd commented 4 years ago

If added, this would require some close coöperation with sub signatures, and also multi-dispatch as mentioned by #7

toddr commented 4 years ago

Speedups and restrictions based on typing variables as int/float, etc.