News for hackers. Stuff that matters.
Re:Confident Code by airlocksoftware on Thursday November 10, 2011 @12:26AM (#3219048)
Good points. Any idea what a good solution would be?
Re:Confident Code by grandalf on Thursday November 10, 2011 @12:33AM (#3219068)
I 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
Re:Confident Code by regularfry on Thursday November 10, 2011 @03:08AM (#3219386)
I 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.
Re:Confident Code by grandalf on Thursday November 10, 2011 @08:21PM (#3222890)
If 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.
Re:Confident Code by einhverfr on Thursday November 10, 2011 @03:40AM (#3219446)
I 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.