Hacker News new | ask | show | jobs
by st3v3r 3535 days ago
Let's say I have an object representing a file in the file system, and I'm writing a file browser. I give the user the ability to rename the file.
1 comments

I would say that at that point, it ceases to be a simple setter method (or set property). It's not a simple case of mutating some element of a data structure of filenames as strings. There'd be some validation and error handling involved. It's a perfectly valid high level message to send a file object.

As an aside, I'd probably make a method called "rename" that does this, as opposed to something like "setName".