Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Remove bless reference or class/package name from method arguments

by phaylon (Curate)
on May 20, 2009 at 22:46 UTC ( #765341=note: print w/replies, xml ) Need Help??


in reply to Remove bless reference or class/package name from method arguments

May I ask, if it isn't tied to the class, why is it a method in the first place?


Ordinary morality is for ordinary people. -- Aleister Crowley
  • Comment on Re: Remove bless reference or class/package name from method arguments

Replies are listed 'Best First'.
Re^2: Remove bless reference or class/package name from method arguments
by dsheroh (Prior) on May 21, 2009 at 09:36 UTC
    Static methods have a long history in OOP. Just because it operates at the level of the class without referencing any details of a specific instance doesn't mean it's not tied to the class.

      Alright then. I think I still wouldn't want to do this though, but merely out of maintainability issues. Foo::bar and Foo->bar are not the same, and I wouldn't expect them to be. After all, if you'd want to make a method that accepts an instance as first argument as the invocant, it wouldn't work anymore.


      Ordinary morality is for ordinary people. -- Aleister Crowley

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://765341]
help
Chatterbox?
[Corion]: LanX: Ah, yeah - Frankfurt is in the quake region, but at the very border. I think I've never noticed a quake in Frankfurt myself
[marto]: good morning all
[Corion]: On another topic, in the process of Rubber Duck SoPWing, I wrote a post about the best API for generating HTTP requests (not sending them) and while writing it and fleshing out my sample implementation, I came up with some improvements to my ...
[Corion]: ... existing prototype. Cartesian Products will be proud of that module once it gets out ;)
[Corion]: Hi marto ;)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-01-18 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (161 votes). Check out past polls.