2 ms·
I had a different idea, called UserPrimitive, which allows operator overloading (with some restrictions) on user primitives, but not on objects. The UserPrimiti
by zzo38computer 7y ago
I had a different idea, called UserPrimitive, which allows operator overloading (with some restrictions) on user primitives, but not on objects. The UserPrimitive function takes an object listing the implementation and then returns another function, whose name is a fresh symbol (returned if typeof is used); you can then make your own function to call that returned function to create a user primitive value.