5 ms·
> don't break other people's code for your own profit. How is adding a new kind of function (created from the AST encoding instead of source) with it's own def
by yorwba 9y ago
> don't break other people's code for your own profit.
How is adding a new kind of function (created from the AST encoding instead of source) with it's own definition of .toString() going to break other people's code?
If you don't use binary ASTs you will never even see the new behavior. Unless you are the one mucking around with other people's code, in which case
>> Function.prototype.toString.toString()
"function toString() {
[native code]
}"
Function.protoype.toString is already broken for functions without available source.