Chris.
--
http://www.bluishcoder.co.nz
`+` = plus;
to make that method available under the infix operator's name,
overriding the previous one.
At least that's the way I've been planning to implement arithmetic for
the whole numeric hierarchy. Thinking about it again while I'm writing
this, it really seems it shouldn't be too much work, so maybe I'm
gonna find the time to do it in the next days.
- Tiark
floating-point arithmetic and bit-wise operations on integers should
work now. I have added appropriate methods in
examples/native/VodkaUtil.java, which is loaded automatically
via examples/library/prelude. Please take a look at these files
to see what's implemented exactly.
Note that so far, only 3 + 5, 2.0 + 4.3 and the likes are
supported, but not 3 + 0.5. The reason is that java.lang.Integer
is not a subclass of java.lang.Double, so mixing them in a method
pattern would end up being ambigous. There's an easy workaround,
though:
import native java.lang.Double;
print (doubleValue(3) + 0.5);
BTW, there've been some other changes in the repo, some of
which should provide a little performance improvement.
- Tiark