An alternative FFI/Parser proposal

stéphane ducasse ducasse at iam.unibe.ch
Sun Aug 20 21:26:16 UTC 2006


> 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.

Indeed :)

> 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.

Yes. The point is also to know what is the impact of having such free  
forms.
Because this looks to me like a way to defer (I mean define my own  
kind of macros)
macros. And I was always skeptical about macros in Smalltalk. I like  
them in Scheme but
they do not have late-binding.

> 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?

It seems to me (I may be wrong) that in Tweak event clause are  
syntactic sugar for
more verbose forms as andreas showed in a previous email. This means  
that they can then contains
instance variable and in such as case this is not anymore literal only.

This is even a point to fix before we could adopt sophie (modulo that  
what I said is correct).
But in that case <> is really a macro-expansion mechanism. May be  
this is needed after all
but I would like to see the real advantage. because may be the  
verbose form is good enough.
May be not.  Or at least it is nice that we can talk and discuss it  
like what we do now and this is not just
a cool hack that we have to use ( to put that in a broader context:  
this is somehow related to that issue I
do not like in Tweak the fact that instance variable are defined  
using color (because I'm lucky not to be daltonian)
and I hate that the underlying representation of instance variable  
contain XML while this is totally unnecessary as I mentioned  
loooonnng time ago on the tweak mailing-list --- the smalltalk syntax  
is enough to declare property we do not need XML for that). So I  
learned to like {} and now I'm trying to understand what are the  
deeper implications of what andreas did in the compiler. Because they  
affect the language semantics. And the language can/should evolve but  
at least we should understand the impact.

Stef



More information about the Squeak-dev mailing list