News for hackers. Stuff that matters.
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.
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.

Re:Programming languages, operating systems, despair and anger by gcb on Monday April 19, 2010 @02:33AM (#1276224)
good points. I was pointing out mostly a subjective 'beauty'.

just of note, the architect in me would go for 'why not have both?'