|
|
|
|
|
by csirac2
4337 days ago
|
|
Did you read the linked article? It's not the prettiest intro I've ever seen, but for perl users its benefits can be seen on http://www.houseabsolute.com/presentations/intro-moose-class... vs http://www.houseabsolute.com/presentations/intro-moose-class... Ruby code wouldn't be as verbose as this, but still once you're used to building classes with Moose accessors, types, traits etc. in a mostly declarative manner, going back to hand-rolling checks and exceptions on bad attribute values, not to mention accessor methods and so on definitely feels like a step backwards. In fact now that I'm doing a lot of Python these days I've come to the horrible realization that it's Moose which has made me yearn for a language with stronger emphasis on typing and correctness than Python can provide! Edit: and I don't mean "like java", where it only ever seems to get in your way...
Moose does useful things and gives you stuff "for free" once you've told it what
type something should be. And allows you trivially inherit/override type
declarations, rather than jumping through hoops as in Java.
It's a full about-face compared to the liberation I felt going from C/C++/Java to Ruby back around 2006-2007.Slowly working through Learn you a Haskell, but doubt I'll get a chance to use Haskell professionally. |
|