Re:Programming languages, operating systems, despair and anger
by gcb on Wednesday April 14, 2010 @11:41AM
(#1265185)
i like that because it's a string's method returning a string.
[ Parent
| on HN ]
Re:Programming languages, operating systems, despair and anger
by nailer on Wednesday April 14, 2010 @03:34PM
(#1265890)
Methods aren't defined by what they return. I have a host method (a property, to be precise) that returns a location of the host. It wouldn't make sense for it to return another host object.
string methods are things you do to strings.
list methods are things you do to list.
Most people think of taking a list, and gluing it with a string, not taking a string, and using it as glue for a list.