Hacker News new | past | comments | ask | show | jobs | submit login

i like that because it's a string's method returning a string.



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.


good points. I was pointing out mostly a subjective 'beauty'.

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




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

Search: