HELP: restore my faith in Python

Michael Hudson mwh21 at cam.ac.uk
Sat Mar 4 14:15:04 EST 2000


Johann Hibschman <johann at physics.berkeley.edu> writes:
[snip]
> I can see the FAQ now...
> 
>    Q1.1.2.3: Why can't I divide integers?
>    
>    A: You drooling moron!  You need a 10-page owners manual and
>    instructional video to handle the notational complexity of
>    Tic-Tacs, don't you?  As every schoolboy knows, the integers are a
>    *ring*, not a field, you simpering simpleton.  Oh wait!  Let me
>    guess!  I have to spell it out for you, you festering wombat boil.
>    You can't divide integers by integers and get integers.  Understand
>    now?  Now go out there and don't do it.  And read Herstein, while
>    you're at it.

Might be a tad understated, but that's about my point of view <wink>.

> Hmm.  That might be more of an ML thing...  Scheme can already do it
> right, but otherwise, they'd be all over it, like a cheap suit.  Maybe
> if Perl had a kid with Smalltalk and they kept all the bad features,
> maybe.  :-)

Scheme automatically make rationals doesn't it?  There are situations
where this is not desirable - how much memory were you *expecting* 

(define (improve x) (/ (+ x (/ 2 x)) 2))
(define (gobble amount)
   (define (inner x c) (if (= c 0) x (inner (improve x) (- c 1))))
   (inner 1 amount))
(gobble 100)

to consume?

> (By the way, I use Scheme a lot and all my shell one-liners are in
> Perl.  Flames will be met with orbital bombardment.  I know where the
> EUVE satellite control room is.)

I wasn't suggesting Python should adopt these semantics, but I do
think they make sense for Haskell.

Cheers,
M.

-- 
very few people approach me in real life and insist on proving they are
drooling idiots.                         -- Erik Naggum, comp.lang.lisp



More information about the Python-list mailing list