473,669 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the difference between an object and a type?

thanks
Jul 22 '05 #1
19 1730
Dylan wrote:
thanks


An object is an instance of a type.

Jacques.
Jul 22 '05 #2
It's like the difference between a boxer and a weight class, or an employee and
a job description.

Jonathan
Jul 22 '05 #3
sp******@ontheb all.com news:39******** *************** *********@4ax.c om
thanks


The same as between "a humen" and "the Dylan".

--
~~~~=~~~~l_;~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~
_|\___J \____, Pozdrawiam, moje www, C++, kontakt, itd.:
X-( ssn256 ) Rafal Maj Raf256 - http://www.raf256.com/me-news/
,"-------------" (strona w budowie)
Jul 22 '05 #4
sp******@ontheb all.com news:39******** *************** *********@4ax.c om
thanks

The same as between "a humen" and "the Dylan".


typo... *human*
--
~~~~=~~~~l_;~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~
_|\___J \____, Pozdrawiam, moje www, C++, kontakt, itd.:
X-( ssn256 ) Rafal Maj Raf256 - http://www.raf256.com/me-news/
,"-------------" (strona w budowie)
Jul 22 '05 #5
In article <39************ *************** *****@4ax.com>,
Dylan <sp******@onthe ball.com> wrote:
thanks


object :: type == cookie :: cookie-cutter

--
Jon Bell <jt*******@pres by.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
Jul 22 '05 #6
What's the difference between "int" and "5"?

The question is rather vague. I don't know if it has an answer.
Philosophers have debated this stuff for thousands of years and show no
sign of stopping soon.

When inheritence comes in, it is important not to confuse the different
relationships. The type-instance relationship is not the same as the
base-derived relationship. Sometimes people will get sloppy and use the
phrase "is a" to describe all these relationships, like 'file' is an
fstream, fstream is an ifstream, etc. They are two different things.
--
Dave O'Hearn

Jul 22 '05 #7

"Dave O'Hearn" <da******@pobox .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
What's the difference between "int" and "5"?

The question is rather vague. I don't know if it has an answer.
Philosophers have debated this stuff for thousands of years and show no
sign of stopping soon.
They have? I don't recall any such discussions. For example, "what's the
difference between 'human" and "Bob'?" One is a description/definition, the
other names a specific instance.

I see no confusion (or vagueness) here at all. An object is an instance of
a type. A type is a description (a declaration), which follows very cleary
defined rules in the C++ language. There are built-in types and
user-defined types. Since this question is asked in the C++ language
newsgoup, it seems pretty clear that these are the definitions asked for.

When inheritence comes in, it is important not to confuse the different
relationships. The type-instance relationship is not the same as the
base-derived relationship. Sometimes people will get sloppy and use the
phrase "is a" to describe all these relationships, like 'file' is an
fstream, fstream is an ifstream, etc. They are two different things.
--
That's a rather confusing analogy. The "is a" relationship described public
inheritance, only. What this has to do with types and objects is, well,
nothing as far as I can see...?
Dave O'Hearn


No offense intended, Dave, but I think you're just going to confuse the
newbie here. Philosophy and C++ don't mix very well, in my opinion. :-)

-Howard


Jul 22 '05 #8

"Howard" <al*****@hotmai l.com> wrote in message
news:dO******** **************@ bgtnsc04-news.ops.worldn et.att.net...

When inheritence comes in, it is important not to confuse the different
relationships. The type-instance relationship is not the same as the
base-derived relationship. Sometimes people will get sloppy and use the
phrase "is a" to describe all these relationships, like 'file' is an
fstream, fstream is an ifstream, etc. They are two different things.
--


That's a rather confusing analogy. The "is a" relationship described public
inheritance, only. What this has to do with types and objects is, well,
nothing as far as I can see...?


Agreed. "Is a" makes sense in both contexts, even though it means 2 different
things.
Jul 22 '05 #9
Howard wrote:
I see no confusion (or vagueness) here at all. An object is an
instance of a type. A type is a description (a declaration), which
follows very cleary defined rules in the C++ language. There are
built-in types and user-defined types. Since this question is asked
in the C++ language newsgoup, it seems pretty clear that these are
the definitions asked for.
Exactly. I see no confusion either, but the OP is confused. How?
No offense intended, Dave, but I think you're just going to confuse
the newbie here. Philosophy and C++ don't mix very well, in my
opinion. :-)


Almost. I was trying to show the OP that his question was confusing,
not to confuse the OP. The difference between a type and an object
should be obvious to everyone, no technical background required. If it
isn't obvious, there is probably some confusion in terms. But I can't
guess what that confusion is. It would help if he asked a more specific
question about objects and types. (Un)fortunately , if this is a
homework, he may not be able to.

--
Dave O'Hearn

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
19001
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
100
5238
by: E. Robert Tisdale | last post by:
What is an object? Where did this term come from? Does it have any relation to the objects in "object oriented programming"?
13
5036
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
16
10369
by: Abhishek | last post by:
why do I see that in most C programs, pointers in functions are accepted as: int func(int i,(void *)p) where p is a pointer or an address which is passed from the place where it is called. what do you mean by pointing to a void and why is it done? Aso, what happens when we typecast a pointer to another type. say for example int *i=(char *)p; under different situations? I am kind of confused..can anybody clear this confusion by clearly...
669
25864
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990. http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
17
2079
by: SemSem | last post by:
i want to know waht is an index and how we use it with a simple example including the main of the program . thanx -- Islam Khalil,
38
2305
by: Zytan | last post by:
What is the difference between these two lines? Dim args As Object() = New Object() {strText} Dim args As Object() = {strText} args seems usuable from either, say, like so: Me.Invoke(delegate, args) Zytan
23
3649
by: Jess | last post by:
Hello, I understand the default-initialization happens if we don't initialize an object explicitly. I think for an object of a class type, the value is determined by the constructor, and for the built-in types, the value is usually garbage. Is this right? However, I'm a bit confused about value-initialization, when does it happen, and what kind of values are assigned to objects?
21
5178
by: Nikolaus Rath | last post by:
Hello, Can someone explain to me the difference between a type and a class? After reading http://www.cafepy.com/article/python_types_and_objects/ it seems to me that classes and types are actually the same thing: - both are instances of a metaclass, and the same metaclass ('type') can instantiate both classes and types. - both can be instantiated and yield an "ordinary" object - I can even inherit from a type and get a class
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8803
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.