Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re^4: Why do we say the =~ operator "binds"? (unapplied?)

by jdporter (Canon)
on May 03, 2004 at 13:41 UTC ( #350001=note: print w/replies, xml ) Need Help??

in reply to Re^4: Why do we say the =~ operator "binds"? (unapplied?)
in thread Why do we say the =~ operator "binds"?

There's two issues, happening at two levels of abstraction. At a low (more concrete) level, the two sides of =~ are two arguments of a built-in function. (Yes, at an even lower level, there is no actual such function.) The absence of =~ and its LHS simply indicate to use a default argument there. What to call the =~ operator is an issue at a higher (more abstract) level. It doesn't have to correspond to what's really happening inside the interpreter, or even what we think is happening; but it should accurate reflect how we think of the operator conceptually. And by this standard, "bind" (or "associate") is a very poor choice of terms. Even given your analogy that a regex is kind of function, arguments do not get "bound" to functions. (Arguments get "bound" to parameters, but even that terminology is rarely seen in the Perl community.) I happen to think that "pattern applying" works, but I'll happily concede that there may be something better. "Regex argument passing operator" sounds like it may be accurate, but obviously is unacceptably long.
  • Comment on Re: Re^4: Why do we say the =~ operator "binds"? (unapplied?)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://350001]
[chickenman]: Hi there

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2018-02-20 07:54 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (268 votes). Check out past polls.