4 ms·
I've heard similar claims but I don't think it's true. JavaScript is just as monkey-patchable. You can reassign class methods at runtime. You can even reassign
by sneed_chucker 3y ago
I've heard similar claims but I don't think it's true.
JavaScript is just as monkey-patchable. You can reassign class methods at runtime. You can even reassign an object's prototype.
Existing Python JIT runtimes and compilers are already pretty fast.
- maple3142 3y agoPython is probably much more monkey patchable. Almost any monkey patching that JavaScript supports also works in Python (e.g. modifying class prototype = assigning class methods), but there are a few things that only Python can do: accessing local variables as dict, access other stack frames, modifying function bytecode, read/write closure variables, patching builtins can change how the language works (__import__, __build_class__). Many of them can make a language hard to optimize.