News for hackers. Stuff that matters.
Re:What else are we getting wrong about programming languages? by prmph on Sunday October 30, 2016 @08:28PM (#12833439)
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

Re:What else are we getting wrong about programming languages? by raiph on Tuesday November 01, 2016 @01:20AM (#12843600)
Perl 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