An alternative FFI/Parser proposal

Andrew Tween amtween at hotmail.com
Sun Aug 20 20:39:44 UTC 2006


Hi Stef,
----- Original Message ----- 
From: "stéphane ducasse" <ducasse at iam.unibe.ch>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Sunday, August 20, 2006 9:12 PM
Subject: Re: An alternative FFI/Parser proposal


> > I like it. This certainly addresses all my points.
>
> Is it correct to say that while this solution suffers from the fact
> that text inside <> can be anything
> and that a programmer has to understand each use (at least from a guy
> teaching smalltalk syntax
> I see that as a drawback),

It only has a non-smalltalk syntax, if the extension writer chooses so.
And, given that he has chosen a non-smalltalk syntax, then the problem is no
more complex than if a Pragma form were used.
Consider SQL, with the open form first, and the pragma form second...

    <sql: select * from myTable where name = "Stef" >
    <sql: 'select * from myTable where name = "Stef" '>

Either way, the programmer still needs to know SQL.

It could be argued that the syntax could be like this...

    <select: '*' from: 'myTable' where: 'name' equals: '"Stef"' >

But add a couple of joins, and make the where clause have some ANDs and ORs in
it, and the whole thing would become a nightmare.

it is the way to introduce scope to the
> instance variable
> as in tweak?

I wasn't thinking about that no. Maybe I have missed something, I have only a
basic familiarity with Tweak. Could you expand on that please?

Cheers,
Andy

>
> Stef
>
>
>




More information about the Squeak-dev mailing list