One of the most fun things I've learned about OOP and MVC as I've worked through a couple of languages is that everyone thinks it's a pretty good idea, but no one exactly agrees on what "it" is :) So, in some languages the "parent class" that an instance is based upon may be an object in itself, which can have it's own class-level ("scoped") behaviors and PEMs. So, for a contrived example, you may have an instance of an Invoice that has specific information about its recipients, status, line items, charges and totals, and an Invoice class object that can be queried about all invoices for company X, or a total outstanding value. Sometimes, a scope resolution operator is needed to distinguish between the invoice.total for the instance and the Invoice::total for class. It's OOPy, but a little different than what VFP calls OOP. (Which is different from Java, Python, PHP, Ruby, DotNet, etc.)
The most valuable thing I learned about JavaScript (from the O'Reilly "JavaScript: The Good Parts" by Doug Crockford, a very, very short book) is that JS is not OOP. It is object-based, everything can be an object, but it only has prototype inheritance of properties
On Tue, Feb 21, 2017 at 4:56 AM, AndyHC andy@hawthorncottage.com wrote:
... the Scope Resolution operator ...is not very OOP. It has the smell of a kludge...
why? javascript** is super oopy/functional and you can 'resolve' right back to the god-object - and 'extend' it!
** I am on record as saying it is the very worst language ever - but I acknowledge I've been trampled in the rush to make it ubiquitous.