On 2008 May 26, at 10:19, TSa wrote:
John M. Dlugosz wrote:
I have similar thoughts. I'm thinking that some macros will aid in
writing proper setters via a tie-like mechanism that don't require
any core language changes, so it's not a real problem. That is, a
reusable proxy class that you can construct to run the setter body
code, and package it up so you write it like a method.
I wonder if that couldn't simply be
method attr is rw
{
return self.blahh;
}
Or am I missing something?
What if you want to store a modification of the value? e.g.
compatibility method to set a length in inches when the stored length
is in millimeters.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH