On 06-01-2017, at 11:59 PM, Benoit St-Jean bstjean@yahoo.com wrote:
- I was surprised to find out that SmallInteger>>#maxVal wasn't a constant (or the same on both VM). It's (1<<60)-1 on the 64bit VM and (1<<30)-1 on the 32bit VM. So, be warned if your code depends on SmallInteger>>#maxVal for some reason!
Since the bit size of a SmallInteger is by definition constrained by the word size of the VM, I can’t see why anyone would be surprised by this. SmallInteger is a machine detail specific trick to get basic integer maths to run as fast as we can. One could make a system without it.
- Is there any rationale/reason/explanation as to why, in Pharo, LargePositiveInteger inherits from the class LargeInteger (which doesn't exist in Squeak) ?
A simple matter of factoring preferences. Unless there is a mistake in the refactoring it won’t have any substantial effect.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Teflon brain -- nothing sticks.