Reason for lack of Oracle driver

Tim Rowledge tim at sumeru.stanford.edu
Wed Jul 2 17:29:28 UTC 2003


Martin Drautzburg <martin.drautzburg at web.de> wrote:

> Slang = subset of Smalltalk that can be converted to C, right = I can
> imagine how to write "faster" code this way, i.e. code that CAN run in
> an interpreted way, but is faster when compiled via C.
> 
> But how can I access the oracle client libs from Slang ? I mean, this
> code could not possibly run in an interpreted way.
As John mentioned, the other part of SLang is calling C routines; there
are two ways of doing that.

First one is the more obvious but is a pain if you want to simulate
anything. Use self cCode:'a String of any old C crap you care to write'.
and that c string will go into the translated file. Obviously nothing
much will happen when simulating it so there is another version
self cCode: 'C junk' inSmalltalk:[self sometihngToSimulateCJunk].

Second option is more sneaky
self ioDoWibbleFor: Smalltalk and: self somethingInteresting.
This is completely simulable (assuming you actually implement it all)
and gets translated to
ioDoWibbleForand(a,b)
and depending on what 'self somethingInteresting' is 'b' might be a
variable or another expression. You can see some of this in FilePlugin
I think.

My suggestion would be to look at SmartSyntaxInterpreterPlugin
subclasses to start with. A lot of the scutwork is done for you.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
DYNAMIC LINKING ERROR: Your mistake is now everywhere.



More information about the Squeak-dev mailing list