3 ms·
Slight counter point re: ruby, I complain A LOT about ruby's and the communities tendency to monkey patch everything. It's a dangerous practice that needs to be
by jaegerpicker 12y ago
Slight counter point re: ruby, I complain A LOT about ruby's and the communities tendency to monkey patch everything. It's a dangerous practice that needs to be REALLY well thought out. just like C++ and the operator overloading, I've had bad and good experiences with both. I don't think they need to be removed from the languages but I do think good experienced developers should loudly and quite often proclaim the dangers of over use.
- mikeash 12y agoI think it comes down to culture, not language features. Objective-C allows much the same monkey-patching craziness as Ruby, but the feature is almost always used to just add additional convenience methods to system classes in a fairly safe and sane manner. You can do much worse (and I certainly have), but it's pretty rare.
- andybak 12y agoSame and possibly more so in Python. Monkey patching is regarded as a last resort in clever libraries that need to do things that would be impossible any other way. They are generally clearly signposted as 'smelly but unavoidable'.
- jaegerpicker 12y agoI agree, I'm a python/django developer in my day job and a ObjC/iOS at home. Both are just a easy to monkey patch as ruby but it's much less used. It's one of the reasons I prefer python to ruby.
- mattgreenrocks 12y agoI'm with you there. I hate when anything extends built-in types. Since all code uses built-in types, you can quickly end up in debugging hell.