Since MATLAB does not provide self-reference, what is the actual difference between a static and a non-static method in MATLAB, apart from the latter not being call-able without a class instance? One always has to pass a reference to the object-to-be-modified anyway (edit apart from setters, getters and overloaded operators which implicitly include the self-reference)
Since MATLAB does not provide self-reference , what is the actual difference between a
Share
For non-static methods, Matlab provides the calling class as the first argument. By (personal convention) I call this argument
self, which then emulates a self reference syntax. e.g.:By contrast
Given an object
someObject, these methods can both be called by using:The self-reference discussed in the linked question is referring to package names, which is an entirely different animal.