Comment on "this gem is awesome".to_spanish # = "esta joya es impresionante"parentComments−rbanffy15yI think your example demonstrates very well why one would yearn for Ruby. The ability to give an extra method to a base class allows you to build very expressive code.edit: and, BTW, the to_spanish method is not defined in the https://github.com/jimmycuadra/to_lang/blob/master/lib/to_la... module.−troels15yYou're quite right, but in all fairness, the following would be a saner interface in php: italian_to_spanish("Ciao mondo");−arethuza15yEven boring old C# can do that.−ryanpetrich15yNot true. That's just a compiler trick
Comments
I think your example demonstrates very well why one would yearn for Ruby. The ability to give an extra method to a base class allows you to build very expressive code.
edit: and, BTW, the to_spanish method is not defined in the https://github.com/jimmycuadra/to_lang/blob/master/lib/to_la... module.
You're quite right, but in all fairness, the following would be a saner interface in php:
Even boring old C# can do that.
Not true. That's just a compiler trick