On Mon, Jul 30, 2001 at 01:02:54PM +0900, Paul Prescod wrote:
> "Florian G. Pflug" wrote:
> > 
> > ...
> > 
> > If you write a function, which depends on 1/2 being 0.5, why don't you just
> > write a.to_f / b.to_f?
> 
> Yes, that's a workaround.
Or just stating what the programmer _really_ wants....

> #1. What if your algorithm is also supposed to work for complex numbers?
Well, I guess if returning a float/int instead int/float causes trouble,
returning a complex will cause more troubles.

> #2. It is somewhat ugly to do a type conversion just to guard against a
> flaw in the language.
But whats the flaw? I'd rather say, that in one case one behaviour is
better, and in the other case the other...

If you change behaviour, those who say the current one is current will than
speak of a flaw.

> #3. Programmers (especially new programmers, who haven't been bitten by
> the bug) will often forget to do this.
And will be bitten by the block-argument-local-variable-collision and other
things...

For some problems there exists no perfekt solution

greetings, Florian Pflug