News for hackers. Stuff that matters.
Re:The Universal Standard Library by rurounijones on Tuesday May 29, 2012 @12:48AM (#4036009)
So how do you work around the problems where, for example. (Simplest, quickest example I could thing of.)

PHP = strtoupper($str)

Ruby = "Hello".upcase

Since Ruby is a method on the string object and PHP takes the string as an argument. To make them the same you would need to do either

PHP = upcase($str)

Ruby = "Hello".upcase

In which case you lose context in PHP or

PHP = strtoupper($str)

Ruby = "Hello".strtoupper

In which case you are repeating yourself in ruby.

There are no comments on this comment yet.