in reply to The Accessor Heresy
I think you've just started to create some useless abstractions. Even in a pure OO language, this wouldn't make much sense at all; instead, Area and Radius properties would be some sort of number objects. In Ruby, for instance, they'd probably be Floats.
The only advantage is a better-organized object.
Sorry, but I don't see any better organization here at all. In fact, it seems quite a bit messier to me. You've broken the KISS principle entirely. I understand you are just musing here... but I highly suggest you don't write any actual code like this. Your maintainers will hate you for it.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The Accessor Heresy
by Roy Johnson (Monsignor) on Nov 28, 2005 at 17:19 UTC | |
by sauoq (Abbot) on Nov 28, 2005 at 18:01 UTC | |
by Roy Johnson (Monsignor) on Nov 28, 2005 at 19:02 UTC | |
by sauoq (Abbot) on Nov 28, 2005 at 19:59 UTC | |
by Roy Johnson (Monsignor) on Nov 28, 2005 at 20:36 UTC | |
|