HN user

punditator

3 karma
Posts0
Comments2
View on HN
No posts found.

I suppose it isn't surprising that Odersky glosses over the fact that the new collections library in Scala isn't type-safe. They apparently just couldn't get the variances on type parameters to work out, so they cheated and added an annotation to ignore them: @uncheckedVariance.

"Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way."

Really? But not expressive enough to write the standard collections library I guess?

[UPDATE]: It gets even more amusing -- I just learned they have a paper on the collections library called "Fighting Bit Rot with Types" where they again make no mention of @uncheckedVariance. I guess mentioning that they had to cheat the type system would have undermined their goal of "focussing on the role that type systems play in keeping software architectures coherent over time."