4 ms·
I'm looking forward to an extremely-typed language, where in addition to the usual types, more specific types can be defined with regex expressions, sub-ranges,
by prmph 10y ago
I'm looking forward to an extremely-typed language, where in addition to the usual types, more specific types can be defined with regex expressions, sub-ranges, even function-based rules, etc.
Such extra-strong typing would lead to much more robust program and reduce complexity of testing
- raiph 10y agoPerl 6 supports arbitrary run-time predicates as "subset" types: subset Foo where /foo/; subset Bar where 0 .. 99; subset Baz where * > rand; my Foo \foovar = 'Some food'; my Bar \barvar = 42; my Baz \bazvar = 0.5; # Fails typecheck half the time