News for hackers. Stuff that matters.
Re:Flix – A powerful effect-oriented programming language by pshirshov on Thursday July 10, 2025 @03:01PM (#44524334)
> AFAIK, types are erased by JVM compilers...

Not in all the cases (it keeps type parameters for anonymous classes) and there are various workarounds.

Also, essentially, it's not a problem at all for a compiler, you are free to render applied type constructors as regular classes with mangled names.

Re:Flix – A powerful effect-oriented programming language by jorkadeen on Thursday July 10, 2025 @03:27PM (#44524616)
The parent poster is correct. We do monomorphization, hence Flix types are unboxed. For example, a `List[Int32]` is a list of primitive integers. There is no boxing and no overhead. The upshot is that sometimes we are faster than Java (which has to do boxing). The downside is larger bytecode size-- which is less of a factor these days.

Caveat: Flix sometimes has to box values on the boundary between Flix and Java code -- e.g. when calling a Java library methods that requires a java.lang.Object due to erasure in Java.

Re:Flix – A powerful effect-oriented programming language by vips7L on Thursday July 10, 2025 @11:41PM (#44528198)
Java shouldn’t have boxing “soon”. If we ever see the results of Valhalla.