[Curious] Integer division => fraction

Andreas Raab andreas.raab at gmx.de
Wed Jun 11 22:01:47 UTC 2003


Hi Guys,

Just had an interesting discussion with Dean (over on e-Lang) about integer
division semantics. He pointed out (and I agree) that most people tend to
find it it confusing that "3/4" results in a fraction rather than coercing
to Float by default.

My questions: What do you think about this issue? Are you personally
surprised if you get a fraction back? Has it bitten you in unexpected
places? Have you actually ever had the need for coercing to fractions
instead of floats? Can you think of "typical" applications that would be
harmed by coercing to floats?

Thanks for any info you can share.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list