From 5767804802683649445
X-Google-Thread: f78e5,6f042a6ff823c6a0
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: stkim@yujinrobot.com ("Kim, Seungtai")
Newsgroups: comp.std.c++
Subject: Re: Relation of enermy(anti-friend)
Date: Sat, 28 Aug 2004 02:54:34 GMT
Organization: Korea Research Environment Open Network
Lines: 56
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <cgme9i$bmm$1@news.kreonet.re.kr>
References: <cgk8od$vai$1@news.kreonet.re.kr> <42gsi09guhr518kkffinjpo5f5qaos07gl@4ax.com>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1093661679 22611 158.152.254.254 (28 Aug 2004 02:54:39 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 28 Aug 2004 02:54:39 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,PRIORITY_NO_NAME 
	autolearn=no version=2.64-mulga_r1
X-MSMail-Priority: Normal
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i7S2sYkI022478;
	Sat, 28 Aug 2004 12:54:34 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: Fri, 27 Aug 2004 04:45:38 +0000 (UTC)
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox4.ucsd.edu  (v1.4 May 20 2004 13:55:33, 0.7/5.0 2.63)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 66569 i7R4jgk6072295 mailbox4.ucsd.edu)
Xref: g2news1.google.com comp.std.c++:2258

"Bob Hairgrove"
> This ("enemy") is actually the correct spelling, not "enermy".

Thanks for correction. My mis-spelling.

> I think "public" should really mean "available for everyone".

Yes. And I assert that the mean "avaliable for everyone" can be
easily extented to "available for everone except enemy".

> Limiting
> access to class members can be done by other means, for example making
> all members private and listing only those classes as friends which
> are allowed to access the data.

But, it may be hard to limit a few classes or functions in a extreamly
large scale project. Don't you ever see that the project has thousands
classes and functions?

> Or you can use a common base class and
> make the otherwise "public" members "protected".

I think that it is another subject. Why do you thinks that it can be
the solution in the situation?

> Or using anonymous namespaces,

Scope problem is arised. Only classes in same translation unit can
access them.

> nested classes, etc.

Nested class dose not mean the relation. Never it can represent
the relation.

> Once something is declared "public", however, there is no turning
> back.

So, IMHO, why it can not be? It can provide new notion to our
logical design issus.

> And I believe it is a good thing because it makes you think
> about your classes' designs a bit more.

Thanks for your opinion.

-- 
S Kim <stkim@yujinrobot.com>


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



