Michel Fortin wrote: >> In my design, they are actual functions with actual names. >> >> For D this doesn't really work. If you want symbolic placeholders, you >> may want to use something other than 'get' and 'set'. For example, 'in' >> and 'out' have been suggested by some. They are already keywords. > > One thing with in and out makes me uneasy. Imagine a setter/getter with > a contract: > > int prop.out() > out (result) { assert(result > 3); } > body { return something; } > > void prop.in(int v) > in { assert(v > 3); } > body { something = v; } > > Wouldn't it be a little confusing having twice the same keyword so > close but with a completly different meaning?
I agree, it's far from ideal. Well, I'm sure a solution can be found. It's now just down to detail. -- Michiel Helvensteijn