A literal (including integer) is a subset type. That means they should be able to appear in junction types. Either Larry was being overentheusiastic when he said that literals (including ints) and named values (constants and enumerations) "are" subset types, and the parser ran into trouble actually doing that in full generality, or the STD.pm is just not caught up to his latest vision.
—John
| [reply] |
That's the theory, but for practical reasons (not giving Jonathan a thundering apoplexy, for instance), parameters are currently restricted to a single constraint in front, and will continue to be restricted until we get more experience with the sorting of multiple dispatch candidates using multiple constraints. See the
note in S12, "Multiple constraints".
| [reply] |
| [reply] |