From: dblack@... Date: 2002-08-14T01:12:40+09:00 Subject: Re: ambiguity backtrack - accessors and persistent locals Hi -- On Tue, 13 Aug 2002, Gavin Sinclair wrote: > The syntax (for "setter methods") "object.field = value" implies > simplicity. If you need to jump through various hoops every time a > field is written, you probably want a method that implies it does > something serious. Saying something simple while doing something > complicated will likely make code hard to read. A minor point, > perhaps, but one which, if followed, could again take the sting out > of the writer-method-withoud-explicit-self ambiguity. That's an interesting way to look at it, though I'm not sure it scales very well. I'm thinking of things like hash-like set and fetch methods that operate directly (but transparently) on databases, which I think can be very convenient and not obscure except to the extent that they're designed to black-box-ify the file I/O. I definitely do agree with one part or implication of your point, namely that #field=() methods should set something. I know that sounds obvious, but I think part of what feels shaky to people might be that there's a disconnect between the presence of assignment syntax and the question of what's actually taking place. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav