Re: final/closed classes in Ruby (was: Sharp knives and glue

-----Original Message-----
From: Tanner B. [mailto:[email protected]]
Sent: Thursday, May 11, 2006 3:50 PM
To: ruby-talk ML
Subject: Re: final/closed classes in Ruby (was: Sharp knives and glue)

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.

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

#define private public’. >:)

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…).

“Berger, Daniel” [email protected] 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:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs