4 ms·
Perl 6 new regexp rules
- gjm11 17y agoThe WP article title is "Perl 6 rules". It's just as well Larry Wall decided to call the new feature "rules" rather than, say, "sucks"...
- thristian 17y agoSo apparently Perl 6's regexes are not so much traditional regexes as a compact and efficient syntax for creating parsers and defining grammars... that sounds incredibly useful. I assume other more traditional Perlisms like implicit variable names are coming along for the ride too, though - if they weren't, I'd definitely be more interested in Perl 6.
- thwarted 17y agoI'm not sure what you mean by "implicit variable names". If it's that you don't need to declare variables before you use them, use can use 'use strict' to avoid that. If you're referring to how things like cmp takes a block with $a and $b variables, it saves you having to extract values from arguments for this block which should be really short.
- deleted 17y ago[deleted]
- kqr2 17y agoHow to make a RPN calculator using the regexp rules: http://daniel.carrera.bz/2009/06/rpn-calculator-in-perl-6/ http://daniel.carrera.bz/2009/06/rpn-calculator-in-perl-6/