Hi !
I found that there are implicit types of numbers, integers and floating points.
So a division like this
130 / 100 // -> 1
would silently return 1, because 1.3 does not exists in integers, but i would expect that it returns 1.3
But
130 / 100.0 // -> 1.3
Would just convert all results to a floating point because one of the numbers is.
I think, if Wollok is a language for learning OOP, it should only use floats, because it's not natural knowing information like 13 // is an integer, and 13.0 // is a float, and that they behavior is different, they're just numbers and they should behave the same way.
Hi, Brian,
this error was already reported, so it is fixed in a dev branch. Unfortunately we have to wait until next release. But nowadays we have this test
Hi ! I found that there are implicit types of numbers, integers and floating points.
So a division like this
130 / 100 // -> 1
would silently return 1, because 1.3 does not exists in integers, but i would expect that it returns 1.3But
130 / 100.0 // -> 1.3
Would just convert all results to a floating point because one of the numbers is.I think, if Wollok is a language for learning OOP, it should only use floats, because it's not natural knowing information like
13 // is an integer
, and13.0 // is a float
, and that they behavior is different, they're just numbers and they should behave the same way.Greetings, Brian