4 ms·
For me, the Ruby community's comfort with monkey patching was a big turn off. In Python, you can hack around on class and replace its methods, but if you do, it
by kstrauser 3y ago
For me, the Ruby community's comfort with monkey patching was a big turn off. In Python, you can hack around on class and replace its methods, but if you do, it's expected that your coworkers might stick you in a dunk tank and sell tickets. It's just not the thing that's done.
- EdwardDiego 3y agoI figure if Django built an entire framework around metaprogramming, I'm going to do it to Django model objects as a form of vengeance.
- kstrauser 3y agoI want to see the malicious wonders you can create!
- EdwardDiego 3y agoAn easy way to start taking the fight back to the enemy is by overriding __new__ and tinkering with things before/after Django's metaclass __new__ does its own metafoolery. Also overriding mro() is a fun way to monkey with the inner workings.
- nextos 3y agoMonkeypatching is maybe more of a Rails thing than Ruby. I think the biggest problems with Ruby around the time Python began to take off were slowness (MRI was a disaster, slow, and full of memory leaks), plus patchy documentation (lots of things were in Japanese). Still, I preferred and prefer Ruby. Python has fantastic libraries, but it is a mediocre language. Ruby feels like a simpler version of Perl + Smalltalk, and it is a joy to use. Python has intentionally crippled anonymous functions plus syntactic whitespace, which often leads to long and ugly code. I think it is a shame Guido hated functional programming and he did not embrace an Algol-like syntax with begin/do end blocks. Those two things could have vastly improved Python. Ruby's block, procedure and lambda design is a stroke of genius that yields beautiful code and makes DSLs trivial.
- fuzztester 3y ago>Ruby's block, procedure and lambda design is a stroke of genius Hardly. Not only was it nothing great, it had many variations, making it harder to remember.
- fuzztester 3y agoWhereas in Ruby you get to go to a conf for doing that.
- fuzztester 3y agoDownvoter(s): https://news.ycombinator.com/item?id=37316817 https://news.ycombinator.com/item?id=37316817
- JohnBooty 3y agoFor me, the Ruby community's comfort with monkey patching was a big turn off If it helps, the Ruby community really soured on monkeypatching in general quite a while back. You don't see it much these days and every decent book or guide warns against it. It was definitely a crazier place 10+ years ago in the early Rails days.
- fuzztester 3y ago>It was definitely a crazier place 10+ years ago in the early Rails days. Yeah! It sure was. I was around, was an early Ruby and Rails adopter, and worked on a few commercial Rails projects at that time. That's how I know about the monkey patching issues. Faced them in real life.
- JohnBooty 3y agoI certainly wouldn't blame a person for experiencing those crazier days and thinking the community didn't have the greatest technical vision. I played around with Rails and Ruby when Rails first blew up. But I didn't start doing it fulltime professionally until 2014. By the time it seemed to me that the community was maturing. I think it's in a good place now.