Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: