Timothy Quinn (2014-02-08T08:56:41.000Z)
domenic at domenicdenicola.com (2014-02-10T22:37:35.650Z)
I agree about your note in the context of WAN based web applications. Unless one can constrain the browsers supported and the programming styles for JavaScript OOP, its would be un-dependable to use function.name The challenge of instanceof is that its commonly recognized as [fundamentally flawed](http://bonsaiden.github.io/JavaScript-Garden/#types.instanceof) and not useful. Thus the issue continues for a unified way of detecting the implemented class. JavaScript Garden's Object.prototype.toString method also does not work in all cases. My original method of parsing `<Object>.constructor.toString()` has proven to be very stable in LAN based applications where the application stack and browsers are strictly constrained. My current library is for node.js so I should be able to trust the constructor.name for a majority of objects. I'm going to switch over to constructor.name for node.js and babysit the logic via strong assertions in the business logic. My initial unit tests have all passed with flying colors. On a related note, one can only dream that formalized OOP class definitions can be put into the ECMAScript specification so we can move away from the lack of consistency for OOP. The flexibility is really hurting the language.