On Fri, Aug 06, 2010 at 12:24:36PM +0000, Ævar Arnfjörð Bjarmason wrote: > > I don't think the point is that we should *guarantee* that FETCH will > only be called once per "logical access". But that we shouldn't make > any guarantees *at all*. > > I.e. explicitly document that if you write a tie class you shouldn't > depend on how many times FETCH and friends are called, since they may > be called by the core at unexpected times, and those times may change > without warning in future releases. Well, that may be the easy way out, but does that improve the usefulness of the language? I'm sure it makes it easier for a language implementation if f () OP g () does not make any promises how often f() and g() are called when evaluating the expression. But one has to question whether that's useful for an imperative language. IMO, if $x and $y are tied, $x OP $y should just be a shortcut for (tied ($x) -> FETCH) OP (tied ($y) -> FETCH) I don't think many people will argue you should write f() and g() in such a way that Perl is free to call f() and g() as many times as it pleases when writing f () OP g (); And I fail to see why tied variables should be except. AbigailThread Previous | Thread Next