ИМХО, очень даже неплохо получается.
defineOperation=function(the_class, name, operation){
Object.defineProperty(the_class.prototype, name, {get: Function(operation)})
}
defineOperation(Number, "inc", "return this+1")
defineOperation(Number, "double", "return this+this")
a=1
a=a.inc.inc
alert(a) // 3
alert(2..double) // 4
Person=function(name, lastName){
this.name=name
this.lastName=lastName
}
defineOperation(Person, "fullName", "return this.name + ' ' + this.lastName")
person1=new Person("Jack", "Smith")
person2=new Person("John", "Doe")
alert(person1.fullName)
alert(person2.fullName)
// Jack Smith
// John Doe