comp.lang.ada
 help / color / mirror / Atom feed
* C++ Envy
@ 1995-01-12  9:39 R.A.L Williams
       [not found] ` <3f9bha$r16@gnat.cs.nyu.edu>
  0 siblings, 1 reply; 19+ messages in thread
From: R.A.L Williams @ 1995-01-12  9:39 UTC (permalink / raw)


Look chaps, this is getting a bit silly. Assume that I want to change
the functionality of a piece of code that I've picked up from somewhere.
Why should I bother with sma****se tricks like the ones that have been
suggested? Why not dive in and hack the code! This technique also
works in Ada83 and Ada95!

The point about 'private' in C++ or Ada is that it is an indication to 
the user that part of the interface is NOT meant to be mucked about with.
You, the user, still have to have sufficient self-discipline not to
muck around with it. As an added bonus, the compiler will tell you
if you do it by accident. That's what it's for -- to pick up mistakes!

Bill Williams




^ permalink raw reply	[flat|nested] 19+ messages in thread
* C++ Envy
@ 1995-01-05 17:12 SBS Engineering
  1995-01-06 17:21 ` Huayong YANG
  0 siblings, 1 reply; 19+ messages in thread
From: SBS Engineering @ 1995-01-05 17:12 UTC (permalink / raw)


Tired of hearing about all those things that C++ can do that Ada87 can't?
Then here's a cute trick in C++ that you'll like:

#define private public
#include compromised_class.h
#define private private

Confused?  The above says that when compiling the class header for
compromised_class, all the private stuff will be public, and thus
available to the world.  A friend showed me the above, and quoted the
source as saying that eternal damnation was insufficient punishment...
Hard to argue with.

-- 
Pat Rogers
progers@acm.org

PS: Yes, yes, yes, I know all languages allow one to say silly and
questionable things.  If you're upset by this post, then get a life!



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~1995-01-30 16:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-01-12  9:39 C++ Envy R.A.L Williams
     [not found] ` <3f9bha$r16@gnat.cs.nyu.edu>
     [not found]   ` <3fcjp5$b0v@cronkite.seas.gwu.edu>
1995-01-16 18:48     ` Robert Dewar
     [not found]     ` <3fe433$evq@nonews.col.hp.com>
     [not found]       ` <3fj4oa$9a8@cronkite.seas.gwu.edu>
1995-01-20  5:30         ` Jay M Martin
1995-01-21 21:13           ` David O'Brien
1995-01-22  6:39             ` Jay M Martin
1995-01-23 14:37               ` Jules
1995-01-24 18:56                 ` Robert A Duff
1995-01-25 15:19                   ` Robert I. Eachus
1995-01-22 21:18             ` Robert Dewar
1995-01-23 22:03               ` Charles H. Sampson
1995-01-25  6:38               ` David O'Brien
1995-01-25 15:49                 ` Jay Martin
1995-01-25 23:47                   ` Jay Martin
1995-01-28 18:52                 ` Chris Warack <sys mgr>
1995-01-30 16:44                   ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1995-01-05 17:12 SBS Engineering
1995-01-06 17:21 ` Huayong YANG
1995-01-09 16:13   ` Cyrille Comar
1995-01-10  4:07   ` Jay Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox