in reply to [OT] Thoughts on Ruby's new absent operator?

Well, here "my thoughts"

How do I post a question effectively?

my problems:

Why don't you try to explain to us the advantages of this construct over negativ look (ahead|behinds) in (pseudo) Perl code?

That's the way to initiate a decent discussion here.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: [OT] Thoughts on Ruby's new absent operator?

Replies are listed 'Best First'.
Re^2: [OT] Thoughts on Ruby's new absent operator?
by perlancar (Hermit) on Mar 25, 2017 at 02:53 UTC

    I admit spending too little time on the post, while waiting to go into a class and on a rather fickle wifi connection, so I guess I kind of deserve your reply. That said: 1) I did consider Meditations, but picked Seekers of Perl Wisdom instead; 2) I assume at least some of the monks here are fans of regular expressions and have read about the absent operator, so I need not present much introductory materials.

    I have no strong opinion yet on the feature, perhaps will only do so after finding some practical use-case for it and seeing its performance characteristics.

      Sorry but the sources I found are frustratingly obscure, and installing the latest ruby to understand a badly documented experimental feature is not an option.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

Re^2: [OT] Thoughts on Ruby's new absent operator?
by Anonymous Monk on Mar 24, 2017 at 18:30 UTC
    Was it really that hard to follow?

    "The negative look-behind essentially looks to see if the specified expression is present and then fails if so. The absence operator, however, ensures that anything that isn’t the specified expression will match."