1
vote
3answers
255 views

What are the drawbacks of not declaring a class-method static?

On the 'Interfaces' trail on the Oracle website, we are presented with the following scenario: Imagine a futuristic society where computer-controlled robotic cars transport passengers through ...
0
votes
0answers
26 views

How would I handle a set of differing event classes with differing handler interfaces in a single event processor?

I'm working on an event processor framework for a simple game I'm writing, in which multiple types of events are handled in a loop. Since these events carry distinct pieces of data (i.e. one carries a ...
3
votes
6answers
720 views

In Java, would you sacrifice type safety for a nicer programming interface

When and why would you generally sacrifice typesafety for a nicer programming interface? Let me give you an example: if you had the choice between two event aggregators, which one would you prefer ...
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 ...
1
vote
2answers
455 views

Using Map in Java (or other strongly-typed languages) to work with unstructured data

After looking at the core data type for frameworks that deal with unstructured data in java: json java library: JsonObject Mongodb java api: BasicBSONObject SolrJ (Solr java client): SolrDocument ...
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 ...