Correct C++ tutorial chapter 2.1 "Classes" available (Windows, mingw/msvc/std)

T

Thomas Hansen

M Jared Finder wrote:
[snip]
Or do you consider Smalltalk, the language that made OO popular, not an
object oriented language precisely because it does not have the concept
of private members?

No, but (a little bit boored in repeating myself) I consider it's
ability to hide internal implementation OO's biggest feature...

..t
 
M

M Jared Finder

Thomas said:
M Jared Finder wrote:
[snip]
Or do you consider Smalltalk, the language that made OO popular, not an
object oriented language precisely because it does not have the concept
of private members?

No, but (a little bit boored in repeating myself) I consider it's
ability to hide internal implementation OO's biggest feature...

But not all OO languages have this "feature"! Smalltalk, Python, and
Common Lisp all have no concept of private members built in to the
language; if you want to have a private member it must be enforced by
convention (or with Lisp, by macros enforcing the convention).

Since these languase are considered OO by many other people, there are
only three possible conclusions:

1. Your definition of OO is different from everybody else's definition
of OO.

2. Smalltalk, Python, and Common Lisp are not OO languages.

3. OO is orthogonal to private members.

I choose 3, because I do not see any benefit to making OO include
private members, striking down 1, and I find 2 to be just silly, since
that would exclude Smalltalk from being an OO language. Which one do
you choose?

-- MJF
 
T

Thomas Hansen

M Jared Finder wrote:
[snip]
But not all OO languages have this "feature"! Smalltalk, Python, and
Common Lisp all have no concept of private members built in to the
language; if you want to have a private member it must be enforced by
convention (or with Lisp, by macros enforcing the convention).

Excuse me for asking but have you read what I have been writing at all?
Since these languase are considered OO by many other people, there are
only three possible conclusions:

Well according to the "mainstream" definition of OOP among other things
the language needs to support polymorphism (also according to our good
Smalltalk friend Alan)
Polymorphism is one way to hide implementation details from use of
object.
The language also needs to support inheritance which is also another
way to hide implementation.
1. Your definition of OO is different from everybody else's definition
of OO.

I have never talked about the definition of OO, I have been talking
about (all the time) OOP's main feature, which still is it's ability to
hide implementation details.
2. Smalltalk, Python, and Common Lisp are not OO languages.

Well if they don't support polymorphism or inheritance they aren't!
(my guess is that they do support the mentioned mechanisms though)
3. OO is orthogonal to private members.

I have never stated that OO is in anyway dependant on the language
ability to do private data/function members...
If you feel I have then please let me know where and I'll try to clear
up the misunderstandings...

Thomas Hansen
 
M

M Jared Finder

Thomas said:
I have never stated that OO is in anyway dependant on the language
ability to do private data/function members...
If you feel I have then please let me know where and I'll try to clear
up the misunderstandings...

I got that impression from your second post to this thread:
Might be OO is polymorphism for you, but the single most importent
feature today with OO according to it's "creators" is Data Hiding also
known as Encapsulation!
You've got a "black box" you know if you feed it a direction it will
try to move in that direction, how this is being done is up to the
implementation to decide.
If this is a shared interface, a template policy, a concrete class is
less importent.
The point is that it may rely upon 500 non visible functions and 1000
private data-members which you don't even know exists!
Before OO we had stuff like (C) void * (typesafety), struct's where all
the data was "wide open" to manipulate for everyone (no encapsulation)
etc.

The reason I replied to this was that you stated that the most important
programming concept -- abstraction -- was invented by OO. This thought
would prevent you from ever becoming a great programmer. A great
programmer realizes that the C++ programming language is just another
abstraction, understands how he could implement that language in a lower
level language, and understands under what conditions he would want that
type of abstraction. I don't see how you could come to that type of
realization if you thought that abstractions only existed as private
data members of a structure.

-- MJF
 
G

Gregory L. Hansen

I got that impression from your second post to this thread:


The reason I replied to this was that you stated that the most important
programming concept -- abstraction -- was invented by OO. This thought
would prevent you from ever becoming a great programmer. A great
programmer realizes that the C++ programming language is just another
abstraction, understands how he could implement that language in a lower
level language, and understands under what conditions he would want that
type of abstraction. I don't see how you could come to that type of
realization if you thought that abstractions only existed as private
data members of a structure.

Since my newsreader triggered on Hansen's name...

At work I do a lot of programming in Igor Pro, which is a data analysis
environment. It has a lot of nice programming features for data
manipulation, displaying data, building GUIs, and so on, but very little
in the way of objects, data hiding, and other things you'd expect from a
modern programming language. I fake classes and encapsulation with data
folders and naming conventions.
 
T

Thomas Hansen

M Jared Finder wrote:
[snip]
The reason I replied to this was that you stated that the most important
programming concept -- abstraction -- was invented by OO.

Exactly where did I state this?


Thomas Hansen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top