[PROPOSAL] Disallow // and \\ in Slang code (was: Re:
Squeakarcheology - quo vs. //)
Andreas Raab
andreas.raab at gmx.de
Wed Apr 7 18:16:33 UTC 2004
Tim,
> Sounds plausible to me but we will have to remember to update those
> primitives that are generated from code outside VMMaker.
> MiscPrimitivePlugin for example.
The translator should raise Big Ugly Notifiers if you use // or \\ - this
will point out in no unclear terms that there's a problem.
> I notice that Bitmap>encodeInt:in:at: for example uses both // and \\
> so we'd need to make sure it works for translation and direct running.
That's the idea behind div: and mod:, e.g., we'd just define:
Number>>div: aNumber
"Divide the receiver by aNumber. This method must be used by translated
primitives to provide the same semantics both in Squeak as well as in
translated C."
^self quo: aNumber
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|