Wandering through the libraries

Bill Frantz frantz@communities.com
Thu, 15 Oct 1998 10:46:55 -0700


At 11:32 PM 10/14/98 -0700, Mark S. Miller wrote:
>At 12:24 AM 10/12/98 -0700, Ka-Ping Yee wrote:
>>> >I think calling atan2, min, max as methods on a double looks
>>> >pretty weird... min and max in particular are probably best
>>> >provided with a tuple or an unlimited number of arguments,
>>> >aren't they?
>>> 
>>> Ok, I buy it for min and max.  What's your beef with atan2?  How about
cos?
>>
>>All the one-argument functions like cos and sqrt do make sense
>>in a reverse-Polish-esque sort of way.  I'm not screaming to
>>have the "atan2" method removed (or even the "min" or "max" methods
>>removed for that matter)... i just hope that "x atan2(y)" is not
>>the *only* way to call atan2, as it will look a little strange to
>>some people.  
>
>Is this TOOWTDI Ping speaking??  The one who (thankfully) argued me out of
>having both "size" and "length" in the language?
>
>
>>Presumably there is some sort of math package
>>with all kinds of stuff in it, where min, max, maybe even
>>mean, mode, median, stdev -- whatever -- would go...
>
>Given http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Math.html
>should I just drop these methods from double?

I seem to remember reading somewhere that the mathematical functions in
java.lang.Math were defined as statics because that was the way people had
been using them since the days for Fortran I.  Since they are side-effect
free, there is no reason not to bow to tradition.  (Visions of Fiddler on
the Roof here.)


On URLs.  The user should be able to understand the parsing rules of the
language.  Having URLs as strings helps that goal.  Using <url> would also
help.