Why "public" "private" "protected"

Why "public" "private" "protected"

Post by Howard Gardn » Sun, 06 Apr 2003 13:20:00



Fluff question, but it's always puzzled me a little. Either "commmon" or
"communal" are a better fit than "protected." Anyone know how
"protected" was picked?

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

 
 
 

Why "public" "private" "protected"

Post by Bjorn Roa » Tue, 08 Apr 2003 06:30:59



> Fluff question, but it's always puzzled me a little. Either "commmon" or
> "communal" are a better fit than "protected." Anyone know how
> "protected" was picked?

I think "protected" is fine.  But as for why it was picked, just an educated
guess, but "protected" was (and is) a keyword in Simula.

http://www.iro.umontreal.ca/~simula/ManPage/images/sg_150.html

Bjorn

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

 
 
 

Why "public" "private" "protected"

Post by Allan » Wed, 09 Apr 2003 04:12:17



Quote:> Fluff question, but it's always puzzled me a little. Either "commmon"
> or "communal" are a better fit than "protected." Anyone know how
> "protected" was picked?

I wasn't there, so this is just a guess.

I think that when Stroustrup was devising the new language, he picked
new keywords largely the same way that's done now: he looked for a
word with the correct meaning, but not largely used in the language.

I don't know about "communal," but "common" was used very often (in C
programs) with several meanings. One meaning that I am familiar with
actually comes from FORTRAN's idea of global (rather than file-scope)
variables. I know for a fact that it also had other uses, possibly as
a variable name in some programs.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

 
 
 

Why "public" "private" "protected"

Post by Jonathan Bigg » Thu, 10 Apr 2003 01:18:53



> Fluff question, but it's always puzzled me a little. Either "commmon"
> or "communal" are a better fit than "protected." Anyone know how
> "protected" was picked?

"common" or "communal" would have too much connotation overlap with
Fortran, where it means something very different.

My guess is that Stroustrup liked the alliteration.

--
Jon Biggar
Floorboard Software


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

 
 
 

Why "public" "private" "protected"

Post by Jon Belinfant » Thu, 10 Apr 2003 01:19:05


protected seems a perfectly fine keyword to me. It is self-explanatory.


> Fluff question, but it's always puzzled me a little. Either "commmon" or
> "communal" are a better fit than "protected." Anyone know how
> "protected" was picked?

> ---
> [ comp.std.c++ is moderated.  To submit articles, try just posting with ]

> [              --- Please see the FAQ before posting. ---               ]
> [ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]
 
 
 

Why "public" "private" "protected"

Post by KIM Seungbe » Sun, 20 Apr 2003 13:23:49





> > Fluff question, but it's always puzzled me a little. Either "commmon" or
> > "communal" are a better fit than "protected." Anyone know how
> > "protected" was picked?

> protected seems a perfectly fine keyword to me. It is self-explanatory.

Self-explanatory? How? Protected against what?

The meanings of "public" and "private" are obvious, and so is their
contrast, but I too have wondered how "protected" came in between,
to mean something that's open to the derivatives (like "public")
but closed to others (like "private").

--

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]

 
 
 

1. "own" vs "uses" vs "contains" vs "is a"

I am studing for a VB exam and the book I have mentions there are
relation types between objects. (New Riders pg. 22 "MCSD Visual Basic
6 Exams 70-175 and 70-176".  (FYI - I did take a course in Object
Oriented Design!)

The book does not give any examples, but I have come up with the
following examples for the relation types that the book says exist. I
came up with the examples etc. from another book by Kurata ( Doing
objects in Visual Basic 6".

My question is how is "contains" different from "has a" I cannot come
up with an example.

"is a" - example a programer "is a" employee. In VB this might be
called a subclass.

"uses" - a data screen "uses a" employee object. In VB this might be
called a collaborator.

"has a" - and employee "has a" time sheet. In VB this might be called
a container.

"contains" -

2. LEXMARK PRINTER AUCTION!!!

3. Removing "My Computer", "Recycle Bin" and "Network Neighborhood" from desktop

4. sunwindows

5. extern "FORTRAN", extern "Pascal", extern "Ada" ... ?

6. whole house controller

7. How to use "inport" and "outport" in "C"

8. games needed

9. Guide to "X", "Open" and "Objects"

10. why "CTransInPlaceFilter" can not be connected with "DirectSound" filter

11. why "xxx DIALOG" and not "DIALOG xxx"

12. Why Does strchr() work with a "huge" pointer in a "large" model?

13. Why can't "static" and "virtual" be combined?