You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@zonyitoo To support other primitive types, the front-end, backend and type-checker all need to be modified. Maybe sub-typing is also required to express the relationship between numbers. But I think @tomtau is now reconstructing and polishing the backend. Maybe we can work on this function after merging the new backend?
By the way, If you really need to use floating point numbers, I have made a patch (linusyang/fcore@c22894c) for supporting basic floating point operations for only naïve compiling method. Expressions like java.lang.Math.sin(1.0) or 2.0E-1f + 3.0f * 4.0f are allowed in that fork (No support for unary operation or type casting).
@linusyang It's not that urgent. Since I am writing a parser for F2J, if F2J doesn't support floating point number, then I won't support floating point number either. (Maybe the problem is how to distinguish between 1.2 and 1.toString()?)
I think merging the new backend may be more useful to me, because when the lines of code reach 2000+, the name of *.class files may be too long (as I said on Slack).
Also, if you are refactoring the backend, please consider to support module system with @EmmaBYPeng . I think they are related.
Currently F2J only support decimal integers. Maybe we could also have other primitive numeric types in Java (Byte, Short, Long, Float, Double).
Also, the following should be supported
For enhancement, the following could also support ;)
The text was updated successfully, but these errors were encountered: