3 ms·
At this point I feel tempted to simply draw the line between languages that have syntax to pull the first parameter of a function to the left side of the functi
by usrusr 3y ago
At this point I feel tempted to simply draw the line between languages that have syntax to pull the first parameter of a function to the left side of the function name and languages that don't. All features beyond that are variations of the theme that should better be spelled out in full, trying to claim them as defining properties of OOP reeks of self-importance.
And even if you take the liberty of declaring that a more general definition paired with a more specific one, the more specific one should not so much distinguish on language features but on the standard lib: is your typical stdlib call something scoped to an object (subject parameter pulled to the left) or is it some global name or with just a namespace on the left? mystring.length() vs strlen(mystring)? Most languages these days have both, but if the "strlen" form is the dominant one no amount of OO features should allow you to call yourself OOP without twitching. And if object.method() is the dominant form, how you got there is just details. It feels embarrassingly lame to stay that close to the syntactic surface, but the dogmatic deep-dives really don't help.