In Ruby, to get an absolute clean inheritance chain, you can inherit from BasicObject instead of Object . Thus, you do not have an object with methods that you do not necessarily need (methods that are part of Object.prototype ).
Does JavaScript have a similar means of defining a base object?
function Person(name){ this.name = name } var mac = new Person('Mac') delete mac.toString
Once you create an instance of the object using the constructor function, the delete properties of the object cannot be found if these properties are actually found on the prototype.
I do not need these methods for my object.
Mario source share