5 ms·
Good points. Any idea what a good solution would be?
by airlocksoftware 15y ago
Good points. Any idea what a good solution would be?
- einhverfr 15y agoI don't know about Ruby but when this occasionally happens to me in Perl the answer is not to import anything and call methods by their package name.
- grandalf 15y agoI think a good solution (for Ruby) would to add something like that to a future Ruby version. These things do conflict with Ruby's core semantics a bit, but they do open the door to some intriguing styles -- as does this: https://github.com/intridea/hashie https://github.com/intridea/hashie
- regularfry 15y agoI proposed a not-dissimilar idea on ruby-core recently. It got a little support, but was mostly ignored. It can be remarkably difficult to get meaningful changes adopted.
- grandalf 15y agoIf ruby core shrinks and more of the standard libraries move to gems, it will be easier to just write this sort of thing as a gem and let the best ideas win out. The state_machine gem is a great example of the slow (but very solid) evolution of acts_as_state_machine into a highly useful general ruby library.