0
votes
1answer
182 views

Can we say that Java or C# have unified inheritance trees?

Can we say that Java or C# are OO languages with a unified inheritance tree/unified type system? By unified inheritance tree/unified type system I mean that every class derives implicitly or ...
16
votes
4answers
3k 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 ...
18
votes
2answers
4k 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? ...
45
votes
5answers
6k 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
2answers
297 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 ...
10
votes
3answers
708 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 ...
11
votes
1answer
654 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
9answers
3k 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 ...