470,641 Members | 2,453 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

set and class

I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.

Apr 15 '07 #1
9 1435
DBC User skrev:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.
http://en.wikipedia.org/wiki/Class_%...ter_science%29
http://en.wikipedia.org/wiki/Set

--
OU
Apr 15 '07 #2
On 2007-04-15 20:13, DBC User wrote:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
A set is a collection of something and usually it is required that each
member of the set is unique in the set (no doublets). A class (as we
talk about here) is a construct in a programming language. Members are
not instances of classes, objects are. When using inheritance the
derived class is not a subset but rather a superset since it will be at
least what the base class was and probably more.

Since you don't seem to have a good understanding of object oriented
programming, (in fact you seem to have misunderstood the basics) I'd
recommend that you find yourself a good book on the subject, since it
can be quite trick in the beginning. There are some that deal purely
with object oriented design and others that combine object oriented
design together with programming, which one you need depends on you goals.

--
Erik Wikström
Apr 15 '07 #3
DBC User wrote:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.
A C++ class is something that you custom design. You can design many
things (members) into it and they can be of many types. You can also
put your own methods into it. It is a fundamental element of the C++
language.

A set is merely a predesigned container for objects, and all of the
objects in a particular set must be of the same type. It is a utility
class provided with the standard library.

--
Scott McPhillips [VC++ MVP]

Apr 15 '07 #4
"DBC User" wrties:
>I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
I don't think class is a very good term to describe that thing as used in
the computing field - so it's natural to have problems with it. But I don't
know of a much better word, template is about the best I can do. Skeleton?
Apparently the people who coined the term didn't like it too much either.
Note that their native language was Norwegian, but I don't mean to imply
that that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
<class etymology . class OR classes simulaThere are several hits but I
didn't see any that seemed likely to really impress me so I only looked at
the first hit. Here is a link to it. If you want to pursue it that search
target should be useful. Note that Hoare is mentioned, that would be, I
think C A R Hoare who is famous for his contributions to the field of
computing.
Apr 15 '07 #5
On Apr 15, 8:56 pm, "osmium" <r124c4u...@comcast.netwrote:
"DBC User" wrties:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
I don't think class is a very good term to describe that thing as used in
the computing field - so it's natural to have problems with it.
As a general rule, no everyday English word will really fit when
describing something as abstract or as precise as the elements
we use in computing. So we make do.
But I don't
know of a much better word, template is about the best I can do.
A C++ class certainly has nothing to do with what I would
understand under the everyday English word template.
Skeleton?
Neither.
Apparently the people who coined the term didn't like it too much either.
What makes you say that?
Note that their native language was Norwegian, but I don't mean to imply
that that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Apr 15 '07 #6
"James Kanze" wrote:
Apparently the people who coined the term didn't like it too much either.
What makes you say that?

I see I forgot to include the link. There was, however, a definitive
description of that link. It is

http://www.the-interweb.com/serendip...erm-class.html

It includes this:

"Our good intentions have not quite worked out, however"

I used the simple minded technique of reading what they said on the subject.
Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

Mantissa, WRT floating point was accreted quickly too.
What's your point??? Simula 67 was before Smalltalk.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

If you prefer tea leaves, be my guest. Or we could wander aimlessly in the
desert.
Apr 15 '07 #7
"osmium" weites:
"James Kanze" wrote:
>Apparently the people who coined the term didn't like it too much either.

What makes you say that?

I see I forgot to include the link. There was, however, a definitive
description of that link. It is

http://www.the-interweb.com/serendip...erm-class.html

It includes this:

"Our good intentions have not quite worked out, however"

I used the simple minded technique of reading what they said on the
subject.
>Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.

It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

Mantissa, WRT floating point was accreted quickly too.
What's your point??? Simula 67 was before Smalltalk.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

If you prefer tea leaves, be my guest. Or we could wander aimlessly in
the desert.
It turns out I was just defending Wikipedia on general principles. Actually
I used, and meant, Google. Unfortunately, I seem to use those two
interchgeably. :-(
Apr 16 '07 #8
On Apr 16, 1:11 am, "osmium" <r124c4u...@comcast.netwrote:
"James Kanze" wrote:
Apparently the people who coined the term didn't like it too much either.
What makes you say that?
I see I forgot to include the link. There was, however, a definitive
description of that link. It is
http://www.the-interweb.com/serendip...ives/70-The-or...
It includes this:
"Our good intentions have not quite worked out, however"
I used the simple minded technique of reading what they said
on the subject.
Remove the context, and you can make anyone say anything. The
following sentence makes it clear that it wasn't the word
"class" they were unhappy with, but the fact that "Many users
tend to use the term "class", or perhaps "class instance", to
denote an object, [...]".
Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.
Mantissa, WRT floating point was accreted quickly too.
And works well.

Don't forget, this is a highly specialized, technical
vocabulary.
What's your point??? Simula 67 was before Smalltalk.
It proves acceptance. Alan Kay was apparently happy with the
word.
(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)
If you prefer tea leaves, be my guest. Or we could wander
aimlessly in the desert.
Or we could use original and reliable sources. The Wikipedia is
often useful as a starting point (although it depends -- if
there's the slightest disagreement concerning the subject, it
generally only points to the opinions of whoever got there
last), but it's certainly not a source worth quoting.

BTW: you really should get another newsreader. Your citations
were completely wrong.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 16 '07 #9
On Apr 16, 3:41 am, "osmium" <r124c4u...@comcast.netwrote:
"osmium" weites:
"James Kanze" wrote:
[...]
It turns out I was just defending Wikipedia on general principles. Actually
I used, and meant, Google. Unfortunately, I seem to use those two
interchgeably. :-(
There's a big difference. Wikipedia gives you one persons
opinion. Google gives you everyone's opinion, and sometimes
some facts as well. Both have their uses, especially Google,
but you have to be careful with both.

If I want reliable information on this sort of thing, I'd go to
the ACM site, and look up the original articles (most of which
would have been published in the CACM).

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 16 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Fernando Rodriguez | last post: by
18 posts views Thread by John M. Gabriele | last post: by
13 posts views Thread by Bryan Parkoff | last post: by
8 posts views Thread by Bryan Parkoff | last post: by
21 posts views Thread by Jon Slaughter | last post: by
5 posts views Thread by Andy | last post: by
3 posts views Thread by Hamilton Woods | last post: by
reply views Thread by emin.shopper | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.