|
|
|
|
|
by sampo
4996 days ago
|
|
If you have, for example class Rational(x: Int, y: Int) {
def numer = x
def denom = Y
}
and then homework is to implement def less(that: Rational) = ???
then you're gonna get 15 000 people answering with def less(that: Rational) = numer * that.denom < that.numer * denom
and another 15 000 with def less(that: Rational) =
numer * that.denom < that.numer * denom
and maybe a couple thousand with something like def less(that: Rational) = numer*that.denom < that.numer*denom
(This example was taken from Scala course lectures, but some of the homework problems are as short as this.) |
|
But it's a moot argument as we need to do a real research (or ask coursera / Martin Odersky for the data, which I'm sure HN community will be happy to run some data mining on)