Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I know that the people working on Rakudo are all smart folks, and not lazy either, so there must be something thoroughly difficult about implementing s///. But, not knowing anything about Rakudo's internals I can't for the life of me imagine what the hangup is. Anyone want to venture an explanation?
    • Well, in part it is laziness, but the "doing work twice is bad" kind. :-) We could probably hack something in for this, but instead are waiting until the grammar engine is advanced enough that we can handle this (and other quoting constructs) the way STD does. Converging Rakudo's grammar towards STD (the standard Perl 6 grammar) is something that pmichaud++ is actively working on, so it shouldn't be too long before we support s/// (I'm the wrong person to give a specific guess though.

      For now, $string.subst(/pattern/ "rep") works (and the fact that this works is one reason we've not hacked something in sooner - because there's a good enough way already).

      Hope this helps (and I'm sure pm will jump on anything inaccurate I said here - I'm not the brains behind the parsing stuff...)

      Jonathan

      • A bit belated but I just wanted to say I appreciate the reply. I know it's just a peeve of mine, but I felt like airing it. And I do hope that the plan is at least to address this by "spring". s/// is just too much "basic idiomatic perl", and if you don't have it it will be your "word count". :)

        • Oh, I'm sure it's a peeve of more than just you. :-) While I mentioned that there's work going on to adopt something like the STD grammar that will allow us to parse these, I neglected to mention that doing that is one of the "must do" tasks for Rakudo *. So yes, we really should have s/// support by then. :-)