2 ms·
Machine code? Lol. They don't even seperate out compile-time branches, like switching on types. If types are known at compile-time, the switch can be collapsed
by rurban 7y ago
Machine code? Lol.
They don't even seperate out compile-time branches, like switching on types. If types are known at compile-time, the switch can be collapsed to the rest. Better languages do that and provide proper syntax to match on types or values or both.
Perl6 (and perl5 given/when) is famously over-designed and under-implemented, with both lsh and rhs needed to be evaluated at runtime, and many inconsistent edgecases, eg matching on arrays vs lists.
destructuring (matching nested structures) is also confusing.