@AaronHall I had no idea "class method" meant anything other than "a method a class has", is google correct in telling me that it actually means "static method"?
@gnat very cool; this lends a lot of credence to the idea of SO limiting sending them here. I do recall when SO burned down their close queue, I still wouldn't call this conclusive - the debugging questions seems to have spiked more in the last 2-3 months from my perspective but perhaps I'm just not looking close enough. Still seems likely you're right based on that and a lack of evidence supporting any other theory
A method (or message) in object-oriented programming (OOP) is a procedure associated with an object class. An object is made up of behavior and data. Data is represented as properties of the object and behavior as methods. Methods are also the interface an object presents to the outside world. For example a window object would have methods such as open and close. One of the most important capabilities that a method provides is method overriding. The same name (e.g., area) can be used for multiple different kinds of classes. This allows the sending objects to invoke behaviors and to delegate the...
Regardless, I think what we're discovering here is that we'd better avoid the term "method" entirely for being hopelessly ambiguous. That's what we do in C++. Member function, static member function. End of!
@LightnessRacesinOrbit oh yeah; "class method" and "instance method" are two distinctions I learned a couple years ago too after a big "the hell you talking about?"
a method that has no idea what class it's a method of...is not even a method anymore, or at most it's a method of some utility class associated with another class
@AaronHall if it helps, I did check the question for language tags before rejecting, and I've never heard any of this terminology in the context of Javascript so it seemed safe to assume it wasn't some weird C# thing
@Ixrec this stuff all depends on your perspective.. the actual mechanics at play are something I suspect everyone here is familiar with. Just the approach to explaining it is tinged by your language culture. For example, nobody anywhere in .NET would ever use the term "class method" because it makes no feckin sense at all and sounds stupid, but it's a totally standard term in I think ruby? and others
@LightnessRacesinOrbit large portion of folk are still convinced it's an "OO" language and because of their misguided sense of both that and what "OO" is they presume JS both has classes and just calls them something else
@Ixrec in some languages they call static methods "class" methods because it's not associated with an instance, and non-static methods are "instance" methods
@LightnessRacesinOrbit I completely agree, but it's seen as the height of recognition and comprehension of "OO" among some languages; if a Rubyist asked you about those terms and you looked confused it would be the same as if you asked someone the difference between static and non-static methods and they looked confused: You'd think them an incompetent
different language cultures, different terms, same concepts
perhaps that's why they have this terribad terminology - languages with free functions have community's that tried to parse 3 different types of functions
@LightnessRacesinOrbit in Python maybe? I don't bloody know..
@LightnessRacesinOrbit I think he's using the term class the way we use the term type because Python doesn't have a static type system so they perhaps lack terminology around the concepts of types
There has been a discussion in chat relating to a question (the question itself being irrelevant to this one), that has revealed I may not know Python whatsoever.
In my mind, although terminology differs across languages, we may generally categorise functions as:
[free] functions
static method...
and I have discovered why they don't call class methods "static" methods, they apparently call free functions static methods, because they have a way of making any free function accessible as if it were a member of anything
@Ixrec he just said you can call it on any class or instance, it isn't a member of anything but pretends to be a member of everything... that's a free function with syntactic sugar
@Ixrec your link supports my position. They have syntactic sugar to make free functions pretend to be methods, and then they call them "static" methods. class methods are what the rest of us call static methods, and instance methods are what the rest of us call "methods"
now that I've found my way to the python docs on the @classmethod and @staticmethod decorators, it's now clear that these terms refer to real things that have definite meanings
the big remaining mystery is the cls thing that @classmethod generates, which those docs don't really say anything about
other than claiming it's "the class", which doesn't help much
does that mean it's a special object with all the non-instance methods of the class but no instance-y bits, or is there other magic going on?
@LightnessRacesinOrbit sort of.. I think because it's "in" the class, it is accessible as a member, but it has zero access to anything in that class - not other static methods or other class methods or anything. "class" methods however I think have access to other classmethods
@AaronHall you should learn one - it would help you communicate with a broader audience on some of these higher level concepts which you're clearly familiar with and understand
I want to know if my implementation is modular and loosely coupled such that pieces can be replaced easily.
Any concrete class that extends the abstract class HexGridLayout will be expected to update the field coords by using the field center of the HexGrid.
Does passing HexGrid to the HexGri...
@MichaelT temperature? Perhaps the frozingness demands more interaction with the various electrically heated devices nearby
Whenever it's cold outside and I let my dog out; when he comes back in the cold seems to have put a rocket up his butt because he flies in and runs circles around the house for like a minute, presumably trying to warm back up
@JimmyHoffa heater in the room. Thermostat sensor says its 70F in here (I can get one room of the house comfortable). And its pestivious nature is that of "purr", rub up against me. One claw extended tap my hand.
user55340
3:18 PM
(just put some cat treats in a "you need to work at it to get them out" treat dispenser)
We've probably taken this as far as we can without a common language
a line at the top saying "forget everything you think you know about 'methods' from other languages" would be the icing on the cake for the first-time reader
to go back to your initial question, then, the edit seems fine if you explain in the reason that it's due to ambiguity with Python's bizarre "method" concept, and check that that's really what the OP (who may be a Pythonista) meant