[Vm-dev] mantis http://bugs.squeak.org/view.php?id=7349
Andreas Raab
andreas.raab at gmx.de
Thu May 7 05:15:11 UTC 2009
Igor Stasenko wrote:
> Interpreterproxy structure v.2.1 contains only 3 function pointers:
>
> sqInt (*minorVersion)(void);
> sqInt (*majorVersion)(void);
>
> /* IMPORTANT!!!
> * The rest of functions can be obtained by plugin by calling a
> getVMFunctionPointerBySelector function.
> * The need in defining additional functions in this struct is gone forever
> */
> void * (*getVMFunctionPointerBySelector)(char * selector);
>
>
> as you see, in case of Hydra, going past v.2.1. is quite pointless. :)
No, you're completely missing the point of the version identifier. It
has two roles: One is to identify which set of functions a plugin can
expect which allows us to provide compatibility functions since the
proxy interface is documented. So one very good reason is documentation.
Second, there is a higher level notion of whether something is
compatible or not - for example the return value from certain functions
change in a 64 bit image accordingly (I don't even know how a 32 bit
plugin is prevented from interacting with a 64 bit image today).
Sometimes you really need a high-level bit that tells you that the world
has changed even if the names stay the same.
It makes absolutely no sense to say "oh, we'll all just look it up and
then somehow it's going to magically work". Version information is
*critical* if you want to play things together in the long term - it has
allowed us to have a very smooth ride for a very long time in this area
and I wish Squeak would have more of that in general.
Cheers,
- Andreas
More information about the Vm-dev
mailing list