Re:BigInt Shipping in Firefox
by zamadatix on Thursday May 23, 2019 @11:22AM
(#19992576)
Only in JS do people seem okay with constantly mucking with built-ins.
[ Parent
| on HN ]
Re:BigInt Shipping in Firefox
by mikepurvis on Thursday May 23, 2019 @11:43AM
(#19992755)
Ruby has a culture around it too: https://www.justinweiss.com/articles/3-ways-to-monkey-patch-...
And you can get some of the patching effect in any language with uniform function/method calls, though typically with a little more scoping and thus less ability to inflict unexpected side effects: https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax
For pretty much the past decade (specially the last few years) I feel the culture has shifted to consider core monkey patches as a pretty bad practice.
Re:BigInt Shipping in Firefox
by hombre_fatal on Thursday May 23, 2019 @12:51PM
(#19993422)
Sure, but it's also a bad practice in Javascript.
If people could muck with builtins in Python, they would. And worse, they'd do it with inheritance and metaclasses. I say this as a Python dev.
Python3 mucked with built in types...
I don't think monkey patching is really common in any version of python. I've not seen it done anywhere.
Re:BigInt Shipping in Firefox
by kevin_thibedeau on Thursday May 23, 2019 @05:07PM
(#19995962)
Setuptools monkeypatches distutils. Pip always uses setuptools so pretty much everything installed via Pypi is the fruit of a monkeypatch.