Skip to content

Comment on "this gem is awesome".to_spanish # = "esta joya es impresionante"parent

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:

    italian_to_spanish("Ciao mondo");

Even boring old C# can do that.

Not true. That's just a compiler trick

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.