Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Apocalypse 5 and regexes

by Juerd (Abbot)
on Jun 05, 2002 at 14:01 UTC ( #171830=note: print w/replies, xml ) Need Help??


in reply to Apocalypse 5 and regexes

What are some of your reactions to the change?

It's time to get rid of traditional regexes, as they are too limiting. Change is needed, and I think Larry Wall did a very good job with this redesign. When I first read the recent Apocalypse, I hated the <s and >s, because it was too html-like. When reading more, it becomes clear that it doable.

<before:> and <after:> puzzle me. I had a feeling they had to be the other way around, but even though this is just a change of perspective, that is even worse. Somehow I never had this problem with the punctuation-laden (?=) and (?<=).

The colon overloading I do not like. Colon will already be very important in Perl 6 as the abverbial colon and probably some other meanings, but in regexes it is used for too many things. :, ::, ::: and :::: should be words, in my opinion. I dislike m/:i foo/. It's confusing, and dictating m:i/foo/ would be better imho. Especially m:w/foo/ and m/:w foo/ being inequal is weird.

Being able to capture into variables simplifies a lot. I like that feature, and will probably use it quite a lot. You say you're concerned about speed, but my guess is that it will be faster than a loop, because more can be handled in the core. Perl 6 itself is expected to be faster than 5 too, so I don't think speed will be a problem.

Best thing is the introduction of closures and boolean expression assertions. Currently, they are available, but the feature is experimental, confusing and inconsistent.

I like the new regexes.

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2022-05-26 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (93 votes). Check out past polls.

    Notices?