Jonathan Worthington wrote:
 On 30/09/2010 21:38, Darren Duncan wrote:
Mark J. Reed wrote:
Of alternatives you didn't mention, I like "put" - as pithy as "get"
and "set", with plenty of corresponding history (SmallTalk, POSIX,
HTTP,...).

Actually, *yes*. I didn't think of this one at the time but when you mentioned the various history of pairs I then thought of get/put related to I/O, as well as FTP, etc.

Also "put" is clearly an action like "get" is, and they're the same length as you say, while "set" is both an action and not an action.

So I amend my prior comment to highly recommend that "set" be renamed to "put" in contexts such as attribute accessors like this.

The problem with put/set etc. is that they tend to fail to distinguish binding from assignment (which is bad - there's a reason we have different operators for them). In the REPR API I called this thing bind_attr to be clear that's what it's doing.

Fair enough. I stand by my general comment that "set" shouldn't be used for things such as this and that there are better alternatives. -- Darren Duncan

Reply via email to