News for hackers. Stuff that matters.
Re:Toward Go 2 by rbehrends on Thursday July 13, 2017 @08:06PM (#14766408)
The key difference between Eiffel and Java generics is that Eiffel allows for covariance by design. Obviously, this is unsafe and runtime type checks had to catch these cases. The goal was originally to resolve this through additional static constraints [1], but in the end the downsides always outweighed the benefits.

In the end, Eiffel stuck with covariance and a type system that is technically unsound, because the simplicity of the type system outweighed any hypothetical gains from making it fully sound.

Practical problems with Eiffel's generics arise mostly from the fact that, like Java, constrained genericity inherently relies on nominal subtyping, which makes it less expressive than it could be.

[1] https://www.cs.princeton.edu/courses/archive/fall98/cs441/ma...

Re:Toward Go 2 by vram22 on Saturday July 15, 2017 @07:47PM (#14779739)
I'll check that out, thanks.