4 ms·
That's very cute. Yeah, I was responding to a post that claimed it was trivial; that's cute but not trivial - although it does demonstrate that using 'alias' t
by mst 11y ago
That's very cute.
Yeah, I was responding to a post that claimed it was trivial; that's cute but not trivial - although it does demonstrate that using 'alias' to rename isn't necessary, which is nice to know.
I can absolutely see how I'd turn this into a full Class::Method::Modifiers re-implementation, so I'll totally stipulate to 'trivial if' :D
- steveklabnik 11y agoI'm not interested in being condescended to, so
- Mithaldu 11y agomst might speak for himself at another time, but i have a personal reason to post, so i will say this: Please do not take this conversation as an affront and throw away what has so far come of it. It has shown you, and Ruby at large, an API that has been proven to be good and useful, and the Ruby community has come up with a way to implement it in a generalized way. I hope to someday be able to learn Ruby and use its OO with similar ease and pleasure as i can use the OO system in Perl 5. So please, do not throw this away. It is a valuable chance to do the same thing Perl has done so many times: Recognize something useful and make it your own.
- mst 11y agoSteve and I had a previous similar conversation; this one got further subject wise, but the original was also a fair few posts deep and we didn't accidentally piss each other off that time. Pretty sure we'll manage to resolve the confusion shortly.
- mst 11y agoWut? I just complimented the code you posted, and changed my mind from "the unconstructive guy upthread said trivial, which it isn't, but steve's been kind enough to give me enough information to see it's trivial if I write a port of CMM, and said port is basically identical rather than requiring the crappy alias approach". I've genuinely no idea why you think I was being condescending.
- kbenson 11y agoI don't know where steveklabnik hails from, but in the US "cute" is sometimes meant with a condescending overtone. I seem to recall you are from the UK (Scotland?) from the last YAPC I was at, so I suspect this is a dialect difference causing a misunderstanding.
- mst 11y agoOooh. Yes. In the above comment, "very cute" should be read as being said genuinely in an approving voice with a big grin, and exactly zero sarcasm. This may be the first time (yeah, English, but do wear a kilt a fair bit) I've ever run into a problem with an American overdetecting sarcasm.
- wycats 11y agoFor what it's worth, I completely agree with the "crappy alias" thing, and wrote a lot about this topic back when I was working on Rails full time (example: http://yehudakatz.com/2009/03/06/alias_method_chain-in-models/ http://yehudakatz.com/2009/03/06/alias_method_chain-in-model...). Ruby eventually added `prepend`, which I demonstrated upthread, and is a genuinely generic, in-language solution to the problem you're talking about.
- wycats 11y agoI dug up my original proposal from 2009, which eventually landed in Ruby 2.0: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/25208 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/...
- steveklabnik 11y agoHey! Just woke up to this. Sorry, it seems as someone else mentioned, That's cute, but $FOO. is seen as really condescending here. It's literally diminutive, suggesting that something might be small and pretty, but not worth adult consideration for Real Stuff. Anyway, if that's not how you meant it, I completely understand. Text is hard. No harm, no foul. Sorry for misunderstanding.