Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Don't no whether to laugh

Reply
Thread Tools

Don't no whether to laugh

 
 
JKop
Guest
Posts: n/a
 
      10-27-2004
http://msdn.microsoft.com/library/de...l=/library/en-
us/vccore98/HTML/_core_using_strict_type_checking.asp

Pay particular attention to:

The types WPARAM, LPARAM, LRESULT, and void * are “polymorphic data
types.”


....when is Microsoft gonna cop-on?


-JKop
 
Reply With Quote
 
 
 
 
Catalin Pitis
Guest
Posts: n/a
 
      10-27-2004

"JKop" <(E-Mail Removed)> wrote in message
news:tUJfd.40138$(E-Mail Removed)...
> http://msdn.microsoft.com/library/de...l=/library/en-
> us/vccore98/HTML/_core_using_strict_type_checking.asp
>
> Pay particular attention to:
>
> The types WPARAM, LPARAM, LRESULT, and void * are "polymorphic data
> types."
>
>
> ...when is Microsoft gonna cop-on?
>
>
> -JKop


I don't think they referred to polymorphism from the OOP point of view. I
think that they meant that a type can have different meanings, depending on
how it is used. For example, WORD can be used as an integer value or as a
reference to an object. This can be somekind of (strange) polymorphism.

Catalin


 
Reply With Quote
 
 
 
 
chris
Guest
Posts: n/a
 
      10-27-2004
JKop wrote:
> http://msdn.microsoft.com/library/de...l=/library/en-
> us/vccore98/HTML/_core_using_strict_type_checking.asp
>
> Pay particular attention to:
>
> The types WPARAM, LPARAM, LRESULT, and void * are “polymorphic data
> types.”
>
>
> ...when is Microsoft gonna cop-on?
>



A polymorphic data type is (I would say, and first few links on google
agree) is a data type which can be store more than one kind of type.
WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.

it is true that they aren't any kind of safe or typed polymorphism, but
polymorphism they are.

Perhaps you should be careful before you start insulting microsoft? (or
point to your definition of polymorphic data type?)

Chris
 
Reply With Quote
 
JKop
Guest
Posts: n/a
 
      10-27-2004

> A polymorphic data type is (I would say, and first few links on google
> agree) is a data type which can be store more than one kind of type.
> WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.



A polymorphic class is a class which contains one virtual function or more.


> it is true that they aren't any kind of safe or typed polymorphism, but
> polymorphism they are.
>
> Perhaps you should be careful before you start insulting microsoft? (or
> point to your definition of polymorphic data type?)



Microsoft deserves to be insulted. "Visual C++" is not C++ at all, it's C.
Open it up there and make a wizard project - all you get is C code.


-JKop
 
Reply With Quote
 
Catalin Pitis
Guest
Posts: n/a
 
      10-27-2004

"JKop" <(E-Mail Removed)> wrote in message
newsvMfd.40162$(E-Mail Removed)...
>
>> A polymorphic data type is (I would say, and first few links on google
>> agree) is a data type which can be store more than one kind of type.
>> WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.

>
>
> A polymorphic class is a class which contains one virtual function or
> more.
>
>
>> it is true that they aren't any kind of safe or typed polymorphism, but
>> polymorphism they are.
>>
>> Perhaps you should be careful before you start insulting microsoft? (or
>> point to your definition of polymorphic data type?)

>
>
> Microsoft deserves to be insulted. "Visual C++" is not C++ at all, it's C.
> Open it up there and make a wizard project - all you get is C code.
>
>
> -JKop


You are getting religious.


 
Reply With Quote
 
Vyacheslav Kononenko
Guest
Posts: n/a
 
      10-27-2004
chris wrote:

> JKop wrote:
>
>> http://msdn.microsoft.com/library/de...l=/library/en-
>> us/vccore98/HTML/_core_using_strict_type_checking.asp
>>
>> Pay particular attention to:
>>
>> The types WPARAM, LPARAM, LRESULT, and void * are “polymorphic data
>> types.”
>>
>>
>> ...when is Microsoft gonna cop-on?
>>

>
>
> A polymorphic data type is (I would say, and first few links on google
> agree) is a data type which can be store more than one kind of type.
> WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.


Can you make a sample of non polymorphic data type then?

> it is true that they aren't any kind of safe or typed polymorphism, but
> polymorphism they are.
>

Then everything is polymorphism more or less.

> Perhaps you should be careful before you start insulting microsoft? (or
> point to your definition of polymorphic data type?)
>
> Chris



--
Regards,
Slava

 
Reply With Quote
 
chris
Guest
Posts: n/a
 
      10-27-2004
Vyacheslav Kononenko wrote:
> chris wrote:
>
>> JKop wrote:
>>
>>> http://msdn.microsoft.com/library/de...l=/library/en-
>>> us/vccore98/HTML/_core_using_strict_type_checking.asp
>>>
>>> Pay particular attention to:
>>>
>>> The types WPARAM, LPARAM, LRESULT, and void * are “polymorphic data
>>> types.”
>>>
>>>
>>> ...when is Microsoft gonna cop-on?
>>>

>>
>>
>> A polymorphic data type is (I would say, and first few links on google
>> agree) is a data type which can be store more than one kind of type.
>> WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.

>
>
> Can you make a sample of non polymorphic data type then?
>


OK, these are polymorphic data types in that they are designed and
assumed to hold different types of data. The best example (void*)
satisfies this condition, a void* could be a pointer to an int* or a
char* or a big_struct*.

On the other hand, I would assume an int* just pointed to an int. (While
the c++ standard does guarantte that if you go (A*)( (void*) a ) where a
is a pointer to A is a valid thing to do, I believe it doesn't promise
you can do (A*)( (int*) a ).

Chris
 
Reply With Quote
 
JKop
Guest
Posts: n/a
 
      10-27-2004

Polymorphism:


Polymorphism is exhibited by a polymorphic class.

A polymorphic class is a class which contains a virtual member function.

A polymorphic class exhibits its polymorphism when a virtual member function
of its is called.

Polymorphism is the concept by which, an object which qualifies as an object
of the polymorphic class, posesses an idicator as to what exact body of code
should be executed when that particular member function is called. One
common way of achieving this is by placing a hidden pointer within the
structure of the object; this hidden pointer is used to determine what
particular body of code is to be executed when a particular member function
of its is called.


Any other definition of "polymorphism" is retarded.


-JKop
 
Reply With Quote
 
Vyacheslav Kononenko
Guest
Posts: n/a
 
      10-27-2004
chris wrote:

> Vyacheslav Kononenko wrote:
>
>> chris wrote:
>>
>>> JKop wrote:
>>>
>>>> http://msdn.microsoft.com/library/de...l=/library/en-
>>>> us/vccore98/HTML/_core_using_strict_type_checking.asp
>>>>
>>>> Pay particular attention to:
>>>>
>>>> The types WPARAM, LPARAM, LRESULT, and void * are “polymorphic data
>>>> types.”
>>>>
>>>>
>>>> ...when is Microsoft gonna cop-on?
>>>>
>>>
>>>
>>> A polymorphic data type is (I would say, and first few links on
>>> google agree) is a data type which can be store more than one kind of
>>> type. WPARAM, LPARAM, LRESULT and void* all seem to satisfy this
>>> requirement.

>>
>>
>>
>> Can you make a sample of non polymorphic data type then?
>>

>
> OK, these are polymorphic data types in that they are designed and
> assumed to hold different types of data. The best example (void*)
> satisfies this condition, a void* could be a pointer to an int* or a
> char* or a big_struct*.
>
> On the other hand, I would assume an int* just pointed to an int. (While
> the c++ standard does guarantte that if you go (A*)( (void*) a ) where a
> is a pointer to A is a valid thing to do, I believe it doesn't promise
> you can do (A*)( (int*) a ).
>
> Chris


Does C++ guarantee that long can be casted to a pointer? Will you assume
that long will keep a pointer? Was long designed to hold pointer type?
So does long satisfy this condition?

--
Regards,
Slava

 
Reply With Quote
 
Howard
Guest
Posts: n/a
 
      10-27-2004

"JKop" <(E-Mail Removed)> wrote in message
newsvMfd.40162$(E-Mail Removed)...
>
>> A polymorphic data type is (I would say, and first few links on google
>> agree) is a data type which can be store more than one kind of type.
>> WPARAM, LPARAM, LRESULT and void* all seem to satisfy this requirement.

>
>
> A polymorphic class is a class which contains one virtual function or
> more.
>


And since when is a "data type" automatically a "class"?

They're referring to data types that can be used in multiple ways. If you've
ever used those LPARAM and WPARAM function parameter types, you'd know how
they're usually used, and can see what they mean by polymorphism. Don't get
too hung up on the C++ use of the term.

>
>> it is true that they aren't any kind of safe or typed polymorphism, but
>> polymorphism they are.
>>
>> Perhaps you should be careful before you start insulting microsoft? (or
>> point to your definition of polymorphic data type?)

>
>
> Microsoft deserves to be insulted. "Visual C++" is not C++ at all, it's C.
> Open it up there and make a wizard project - all you get is C code.
>


Well, technically, that's the wizard, not the compiler. You are certainly
able to "real" C++ code using Visual C++. (Well, at least if you're using
VC++7 or later.)

Not that Bill cares, eh?

-Howard




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Here a good laugh on Novell --> NT -->AL Wireless Networking 7 03-29-2005 07:37 PM
OT: Just for the laugh of it!! zeus MCSE 26 11-10-2004 11:17 AM
Please don't laugh gale ASP .Net 6 10-14-2004 05:08 PM
OT: IE w/ SP2 -- makes me laugh Brian Firefox 2 08-27-2004 02:41 AM
Don't Laugh Brat MCSE 2 11-26-2003 10:00 PM



Advertisments