Den 12.02.2010 14:52, skrev Stéphane Ducasse: >> > Hint: FFI has its own proprietary hardcoded pragma format. > > PS: do you know if FFI declarations are compatible with VW ones or they are > just funky? >
FWIW, DLLCC-declarations are not pragma-compatible either, not sure if they're the same as FFI though. In fact, seing as how ExternalMethod depends on inst var indexes, you *can't* annotate DLLCC-methods (AnnotatedMethod adds inst var with pragmas, so can't easily make ExternalMethod a subclass of it). I see it's implemented differently in Squeak/Pharo though, is it possible to do that with FFI? How about Alien? In my mind, that is a loss for external libraries accessing-code which wants to provide a nice way to deal with changing versions (where version is queriable from the library), as it . F.ex. in the case of OpenGL, being able to tag the ExternalMethods with pragmas like <coreMajor: > <coreMinor: > <deprecatedMajor:> <ext: > <nv:>, etc would make it possible to know if an unsuccessfully resolved method was due to not being supported by your driver/hardware, or a coding error somewhere. It would also be easier to programatically build version-compliant interfaces instead of always prividing an Interface with a superset of what is needed/available. Plus, reasoning about which versions of a plugin is required from a piece of code using the interface gets a whole lot easier. Sure, you can do all of the above with dictionaries of which versions include which methods, but upgrading that to support a new version would be a huge pain, wheras with the pragma approach you simply add new annotations for the things which have changed. Cheers, Henry _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
