But is it rewritten in Rust?
“I’ve got 10 years of googling experience”.
“Sorry, we only accept candidates with 12 years of googling experience”.
deleted by creator
C++’s mascot is an obese sick rat with a missing foot*, because it has 1000+ line compiler errors (the stress makes you overeat and damages your immune system) and footguns.
EDIT: Source (I didn’t make up the C++ part)
I could understand method = associated function whose first parameter is named self
, so it can be called like self.foo(…)
. This would mean functions like Vec::new
aren’t methods. But the author’s requirement also excludes functions that take generic arguments like Extend::extend
.
However, even the above definition gives old terminology new meaning. In traditionally OOP languages, the functions belonging to a class are “static methods” and the functions belonging to an instance are “instance methods”. Static methods are considered methods even though self
may not be defined. So I think that translating OOP terminology into Rust, all associated functions would be considered methods, and those with/without method call syntax are instance/static methods.
Unfortunately I think that some people misuse “method” to only refer to “instance method”, so to be 100% unambiguous the terms have to be:
impl
block.self
(even if it takes Self
under a different name, like Box::leak
).self
, so it can be called like self.foo(…)
.Java the language, in human form.
public class AbstractBeanVisitorStrategyFactoryBuilderIteratorAdapterProviderObserverGeneratorDecorator {
// boilerplate goes here
}
Brand X