Final/closed classes in Ruby (was: Sharp knives and glue)

From: Tanner Burson [mailto:tanner.burson@gmail.com]
Sent: Thursday, May 11, 2006 3:50 PM
To: ruby-talk ML
Subject: Re: final/closed classes in Ruby (was: Sharp knives and glue)

<snip>

But any solution you can put into place with pure ruby, can
be circumvented just as easily. :slight_smile:

True, but if someone goes out of their way to circumvent your protection
mechanisms, the egg is entirely on their face if something goes wrong as
a result. I consider things like private, protected, etc, to be
advisory, not absolute. You break it, you bought it, and all that.

You can circumvent such constructs in other languages as well. Consider
'#define private public'. >:)

Regards,

Dan

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

路路路

-----Original Message-----

Arguably, that is not C but a preprocessor macro. The same thing could be done by including Ruby code and preprocessing using a Ruby script (interesting...).

路路路

On May 11, 2006, at 4:58 PM, Berger, Daniel wrote:

'#define private public'. >:)

"Berger, Daniel" <Daniel.Berger@qwest.com> writes:

You can circumvent such constructs in other languages as well. Consider
'#define private public'. >:)

IIRC, they found that in early OpenOffice header files. :wink:

路路路

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org