Automatic Generation of Glue for Named Primitives
Andrew C. Greenberg
werdna at gate.net
Mon Sep 13 12:11:58 UTC 1999
>This is neat stuff! I feel, however, that it is still kind of complicated to
>write code based on it since one still has to figure out what the
>specification must look like. Have you considered using an approach similar
>to that of the translated primitives (e.g., like in String
>class>>translate:from:to:table:)?! I would love to actually start writing
>primitives by simply providing a small per-primitive specification such as
>MyPlugin>>mySmallIntegerAdd: arg1 arg2: arg2
> self primitiveSpecification:
> SmallInteger "Return type"
> 'mySmallIntegerAdd' "The name of the
> (SmallInteger SmallInteger) "Argument types"
> ^arg1 + arg2
My initial reaction to Andreas' excellent suggestions were
disappointingly clueless. It is now apparent to me that something of
this sort could be relatively straightforward, no less general, and
therefore clearly superior to the separate specification approach.
Slightly less sugary solutions may even be downright easy.
Thanks, Andreas for tweaking me on the point. I agree that the
inline primitive approach is best, and the one used for existing
primitives is even better.
More information about the Squeak-dev