in reply to Re: Re^5: OO Getters/Setters
in thread OO Getters/Setters
Pedantry such as this seems useless to me.
No, I think the distinction is important. If your interface provides direct access to the attribute, it's not encapsulating anything, and thus breaking the foundations of OO design. That doesn't automatically make it bad, but it often is.
Quick! What's a "block structured language" and why is C not one of them?
This isn't something I've encountered before. But with a little help from Google . . .
Block structured languages allow you to have functions nested inside other functions. C/C++ doesn't allow this, which means all those great tricks with closures in Perl and similar languages can't be done.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^7: OO Getters/Setters
by tilly (Archbishop) on Dec 31, 2003 at 22:11 UTC | |
|
Re: Re^7: OO Getters/Setters
by duff (Parson) on Dec 31, 2003 at 18:05 UTC |