News for hackers. Stuff that matters.
Re:OOP practiced backwards is "POO" by tres on Friday December 10, 2010 @09:54PM (#1994009)
Seems to me that Ruby modules affect the same outcome as an interface without all the overhead. Just include the module & you've got the desired behaviors and data types without all the fuss.

You get exactly the same benefits as you would from an interface (minus the rigidity)...

Re:OOP practiced backwards is "POO" by okaramian on Saturday December 11, 2010 @12:02AM (#1994219)
I've been working in C#/.NET for a while and I've started using Ruby recently for a couple of different projects at home. It's messing with my head because I'm starting to kind of hate the rigidity I'm forced to work with when I'm deciding whether I should/should not implement an interface.

That said, yes, Ruby with interfaces seems kind of pointless and is just throwing more code in, which is the opposite of one of the nicer points of the language.

Re:OOP practiced backwards is "POO" by swannodette on Saturday December 11, 2010 @02:51AM (#1994439)
Missing the point entirely. I don't want your module. I want/like your design and I want to provide my own implementation.
Re:OOP practiced backwards is "POO" by russellperry on Saturday December 11, 2010 @11:41AM (#1995110)
I get what you're saying, but Ruby already allows you to do this. If you like an API/design, then go ahead and reimplement it however you like. There are no class-level contracts anywhere in Ruby that would prevent this, and therefore interfaces provide no additional level of abstraction that Ruby doesn't already have.
Re:OOP practiced backwards is "POO" by jules on Saturday December 11, 2010 @06:49AM (#1994659)
Define exception throwing "not implemented" methods in the module.
Re:OOP practiced backwards is "POO" by clyfe on Saturday December 11, 2010 @06:26AM (#1994642)
Override the functions in my module with your own