Wandering through the libraries

Ka-Ping Yee ping@lfw.org
Sun, 11 Oct 1998 04:06:43 -0700 (PDT)


aan(String) 
      Return rec prefixed by "a " or "an " according to a simple (and therefore inadequate) heuristic. 

What's wrong with the heuristic?  Is this method really necessary?

Why is "/" named "approxDivide"?  All operations are limited by
the precision of the registers anyway... does "/" do something
different from the "/" we know, say, in C?

Is it necessary to introduce the extra method calls "isLTZero"
"isGEQZero" etc. with comparisons?  Can't you just expect the
compareTo method to return a familiar numeric value that you
can test directly?

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?

What's the point of the "yourself" method?  (If anything, i
would prefer that it be called "self"... i'd like not to personify
my objects if i can help it.)

Why would one ever want fileUrl: instead of file:?  Is the syntax
and behaviour of URIs in the language documented somewhere yet?

Is an Ejector what we now call an escape?

Does print() accept multiple arguments?  If it does, what does
it join them with?

Further to editCopy vs. editcopy: consider basic language calls
all lowercase, cf. isa, println?

Is there an easy "x in set" test?  cf. Python

    if platform in ['windows', 'winnt', 'win95']:
        print "Warning: your computer will probably crash today."

Python even has special parsing so you can write:

    if x not in [1, 2, 3]:
        ...

Also, Python permits chaining comparison operators so you
can do a quick-n-easy range test:

    if 3 < x < y <= 8:
        ...

If there isn't any other way to know whether a particular key
is associated with a value in a mapping, i would suggest, say,
"haskey" or something short instead of "containsKey" to avoid
a lot of verbiage when checking keys to avoid exceptions.


Ping                                            Talk back to the Web!
<ping@lfw.org>                                       http://crit.org/