[Vm-dev] Re: [squeak-dev] My permanent source of confusion and therefore bugs

Eliot Miranda eliot.miranda at gmail.com
Fri May 14 00:48:46 UTC 2010


(redirecting to vm-dev)

On Thu, May 13, 2010 at 4:41 PM, Igor Stasenko <siguctua at gmail.com> wrote:

> Just want to share my experience working with Interpreter/
> interpreterProxy api using VMMaker.
>
> Make a guess (and answer quickly, in what direction each of these
> methods doing conversion)
>
> positive32BitValueOf:
> positive32BitIntegerFor:
>
>
> got the answer?
>

valueOf: takes a Smalltalk object and returns a 32-bit C value.
IntegerFor: takes a 32-bit C value and answers a Smalltalk object.
I find these natural :)

Things I *hate* are nasty gotchers in Slang like
        self sizeof: #sqLong
which translates to
        (sizeof("sqLong"))
You have to write
        self sizeof: #sqLong asSymbol
to get
        (sizeof(sqLong))
(ouch).

I'd fix this but IIRC there are plugins that use this.  Ho hum.  Some time
we need to rationalize Slang and throw out some of the more evil traps such
as the above.

These methods along with other xxxIntegerFor: and xxxValueOf:
> used most frequently in primitive conversion code.
> And i am really sick of such naming..
>

Why not create some more comprehensible aliases for your own use and get
e.g. Slang to translate them to the form you find hard to distinguish?


>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100513/01d62de0/attachment.htm


More information about the Vm-dev mailing list