Tagged Questions
11
votes
4answers
582 views
Why does Java not do type inference?
I have always wondered why Java does not do type inference given that the language is what it is, and its VM is very mature. Google's Go is an example of a language with excellent type inference and ...
10
votes
2answers
998 views
Type inference in Java 8
Is the introduction of the new lambda notation (see e.g. this article) in Java 8 going to require some kind of type inference?
If so, how will the new type system impact the Java language as a whole?
...
29
votes
4answers
2k views
What can Haskell's type system do that Java's can't and vice versa?
I was talking to a friend about the differences between the type systems of Haskell and Java. He asked me what Haskell's could do that Java's couldn't, and I realized that I didn't know.
After ...
4
votes
1answer
187 views
Nulls in every type and checked exceptions in Java?
I know that null being added to every type in Java is a source of much frustration regarding the language's type system. At the same time I generally hear complaining about checked exceptions - that ...
8
votes
3answers
528 views
How do existential types differ from interfaces?
Given the existential type
T = ∃X.{op₁:X, op₂:X→boolean}
and this generic Java interface:
interface T<X> {
X op₁();
boolean op₂(X something);
}
What are the fundamental differences ...
10
votes
1answer
472 views
(Dis-)advantages of structural typing
I’ve just watched this talk by Daniel Spiewak where he talks about the advantages of structural typing as compared to Scala’s ans Java’s nominal typing. One example for this difference would be the ...
11
votes
10answers
2k views
Why are inheritance and polymorphism so widely used?
The more I learn about different programming paradigms, such as functional programming, the more I begin to question the wisdom of OOP concepts like inheritance and polymorphism. I first learned ...