realbasic-games
[Top] [All Lists]

Re: Alternate 3D (Chris)

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Alternate 3D (Chris)
From: Ben Lilburne <bnej at mac dot com>
Date: Wed, 18 May 2005 09:39:34 +1000
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <BEAF8547 dot 317D%acuipka at statrite dot com>
C++ does not use messages. It uses "late" binding to bind non-virtual methods and a vtable to bind virtual methods at runtime. The "methods" you can invoke on a C++ object are defined at compile time using the type of the pointer.

This is fundamentally different from the Objective C runtime, where a message is an ID and the implementation of a method is looked up at runtime based on the class of the object.

On 18/05/2005, at 4:25 AM, Adam Cuipka wrote:
Now, before you start harping on me saying "Well, C++ uses pointers and I can't send an object a message it can't understand, so your wrong." Let
me say, that you can indeed send a message to an object which it can't
understand in C++.  You just have to know how to do it.

For example, declare an integer, use it as a pointer, point it to some object, then send that object some message it can't understand. Voila.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>