News for hackers. Stuff that matters.
Re:JDK 9 release schedule by st3v3r on Tuesday October 18, 2016 @06:44PM (#12739386)
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.
Re:JDK 9 release schedule by lacampbell on Tuesday October 18, 2016 @06:56PM (#12739472)
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".