[GemStone-Smalltalk] #asInteger truncates instead of rounding
Bruce Badger
bwbadger at gmail.com
Sun Feb 2 08:45:57 PST 2014
Hear hear. The ANSI standard should not be viewed as inert, but should be
a living evolving (but crisply versioned) document. I'd still love to see
an on-gong process revived.
I agree with the argument that changing asInteger would be a bad idea.
Better to remove asInteger from the standard and add in it's place
asIntegerRounded and asIntegerTruncated (or similar). Explicit is always
better IMO anyway.
Bruce
On 2 February 2014 16:26, <martin_kraft at comcast.net> wrote:
> Hi Richard,
>
> we do rely on VisualWorks answering the same result as GemStone, which is
> truncating towards zero.
>
> If you could get VisualWorks >= v9.10 aligned with GemStone >= v3.2 and
> the ANSI standard in some future version I would be happy to support this
> questionable approach once we upgrade both GS and VW.
>
>
> Nevertheless, my personal opinion of "asInteger" sent to a number is that
> it should truncate towards zero.
>
> Other languages do that since many years.
>
>
> Maybe a reason to revisit the Smalltalk ANSI standard for "asInteger" ...
> :-)
>
>
> Cheers,
> Martin F.Kraft
>
> ------------------------------
> *From: *"Richard Sargent" <richard.sargent at gemtalksystems.com>
> *To: *gemstone-smalltalk at lists.gemtalksystems.com
> *Sent: *Thursday, January 30, 2014 1:58:05 PM
> *Subject: *[GemStone-Smalltalk] #asInteger truncates instead of rounding
>
>
> As some of you may have noticed, #asInteger truncates. ANSI Smalltalk
> specifies that it should round. Consequently, we are considering changing
> this with the other ANSI compatibility changes we are making for the 3.2
> release.
>
> I would like to know whether anyone is relying on the the truncation
> behaviour or would rather we do not change this.
>
>
> Thanks,
> Richard
>
>
>
> --
> View this message in context:
> http://forum.world.st/asInteger-truncates-instead-of-rounding-tp4740457.html
> Sent from the Gemstone/S mailing list archive at Nabble.com.
> _______________________________________________
> GemStone-Smalltalk mailing list
> GemStone-Smalltalk at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk
>
>
> _______________________________________________
> GemStone-Smalltalk mailing list
> GemStone-Smalltalk at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk
>
>
--
Make the most of your skills - with OpenSkills
http://www.openskills.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/gemstone-smalltalk/attachments/20140202/238e93c0/attachment.html>
More information about the GemStone-Smalltalk
mailing list