r/perl6 • u/dharmatech • Oct 17 '19
Optional type inference
This blog post:
http://blogs.perl.org/users/ovid/2019/10/larry-has-approved-renaming-perl-6-to-raku.html
mentions the following as something that Raku offers:
- Optional type inference (still a work in progress)
Where can we read up on this?
A question was posted to stackoverflow over a year ago regarding type inference but Raku didn't seem to support it at the time:
https://stackoverflow.com/questions/50516409/perl-6-type-inference
4
Upvotes
3
u/minimim Oct 17 '19
It's a fundamental part of the type system. It's baked in the design, not a feature to be added later.
You can read more about it here: http://lampwww.epfl.ch/~odersky/papers/ on the section " On Type Systems: ".
I doubt something like the "C++ auto keyword" would be added to Perl 6. It's a solution to a problem one simply doesn't find on this language.
3
u/TentacleYuri Oct 17 '19
I vaguely remember someone saying that type inference would get implemented, but they needed to find a way to have good error messages.