What are the pros and cons of class and object methods? Which is more
concise (usually)? What kind of computations can be expressed most naturally
using each style)?
Explain PLZ!!!
What are the pros and cons of class and object methods? Which is more
concise (usually)? What kind of computations can be expressed most naturally
using each style)?
Explain PLZ!!!
There is no such thing as an "object method", unless you mean instance methods.
Simply put, if you think you need a static ("class") method you almost certainly should rethink your design.
In about 99 out of 100 cases the idea that one needs them is an indication of a design flaw, and the problem is better solved otherwise.
Some exceptions might be in constructional design patterns like factories, but cases are few, far between, and well known to those that need them.
jwenting: congratulations 7,000 posts!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.