[Newbies] Re: Float-Subclasses?

Andreas Raab andreas.raab at gmx.de
Thu Jun 30 19:51:20 UTC 2011

On 6/30/2011 13:56, bb wrote:
> Am 30.06.2011 11:53, schrieb Randal L. Schwartz:
>>>>>>> "bb" == bb<bblochl at arcor.de>  writes:
>> bb>  onionmixer.net/extra_data/gst.pdf
>> You keep bring up GNU Smalltalk.
>> Not to be annoying, but you *do* realize this is a *Squeak* Smalltalk
>> newbie list.  If you want to get started with Squeak, check out the
>> Squeak tutorials athttp://squeak.org/Documentation/
> I brought up GNU Smalltalk for a good reason:
> I miss that clearification concerning FloatD/FloatE/FloatQ *in any
> documentation about squeak*.

<... snip ...>

> So it should be legal to compare to i.e. "Draft American National
> Standard for Information
> Systems - Programming Languages - Smalltalk" and ask about such
> Smalltalk-80 topics including compatibility. Ironically one can download
> it from the squeak wiki
> (wiki.squeak.org/squeak/uploads/172/standard_v1_9-indexed.pdf). So if
> you do not like GNU Smalltalk, read page 28 of "Draft American National
> Standard for Information Systems - Programming Languages - Smalltalk"
> instead:
> "An implementation may support up to three different floating point
> numeric representations with varying precision and ranges ..."

You should have said this to begin with. Up until this point your 
question did sound like you were simply asking in the wrong place.

> But that source does not explained why squeak does have asFlotD/E/Q as
> well.

Simple: Ansi says that an implementation MAY support different floating 
point numeric representations. Squeak only supports one, Float. However, 
in order to support ANSI compatible code that would rather use 
particular representations, it implements the messages by returning the 
only representation that it supports. So that client code that asks for 
it gets the (only) available approximation for the requested 
representation. Whether that is good enough or not is a different matter 
(personally, I have not seen code that uses #asFloat[E|D|Q]) but this is 
a best effort solution.

> I would be thankful if you give me an advice, where I should aks my
> questions if not at the beginners mail list?

This is the right list. But in the future please provide the relevant 
context such as the reference to the ANSI standard. Asking a question 
like "Why does Foo Smalltalk have class Frobnifier?" is likely to get 
you a response along the lines of "you should ask the people who use Foo 
Smalltalk". However, asking the question in the form "In Foo Smalltalk 
there is class Frobnifier to deal with frobnification. Is there an 
equivalent class in Squeak, or if not, how would you frobnify using 
Squeak?" is perfectly appropriate. It's all about the context.

   - Andreas

More information about the Beginners mailing list