FFI syntax (was: Re: [Vm-dev] Re: testing MT and reentrant)

Igor Stasenko siguctua at gmail.com
Fri Mar 25 08:04:11 UTC 2011


On 24 March 2011 21:50, Lukas Renggli <renggli at gmail.com> wrote:
>
>>> >> Isn't it the best time to migrate the syntax of FFI calls to Pragmas? I
>>> >> know it takes some time to implement the pragma support, but IIRC Lukas did
>>> >> that a few years ago, so dusting it off and adding support for threaded
>>> >> calls (which I didn't see yet) shouldn't be that hard.
>>> >
>>> > SPunds good.  Got any URLs?  Lukas, got any code?
>>>
>>> Sorry, I don't have that code anymore. I used the existing FFI parser
>>> code within a string literal in the pragma.
>>
>> So what do you think of the literal array hack.  And remember, this is
>> for posterity so be honest.
>
> I don't like it to have methods polluted with meaningless symbols
> (that will also show up in senders/implementors).
>

That's exactly why i like it. Now i could use standard tools to figure
out which FFI function using
some fancy type(s).
And that's exactly why i using symbols in primitive names:

<primitive: #primName module: #moduleName>

So, i can quickly access them. And it is _not_ meaningless. Its handy.

> I doubt that the symbol hack will make parsing much simpler, because
> you still need to analyze the token sequence.
>
Yes, that's what my class does.  It is reusing smalltalk parser as a tokenizer.


> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list