News for hackers. Stuff that matters.
Re:Why Type Systems Matter by ardit33 on Friday August 18, 2017 @02:54PM (#15048791)
Java is notorious as it has very clumsy syntax. Simple arraylist of dictionaries declaration looks like this:

ArrayList<Map<String,Object>> myArrayList = new ArrayList<Map<String,Object>>();

Could have been just:

ArrayList<Map<String,Object>> myArrayList = new();

or even better:

ArrayList<Map> = new(); <- if you don't care what the type of map is.

Re:Why Type Systems Matter by blauditore on Saturday August 19, 2017 @07:43AM (#15052846)
As others have mentioned, there's the diamond operator which has been around since Java 7.

> if you don't care what the type of map is

You can use raw types, it works perfectly fine (just generates a compiler warning). For explicitly being unspecific, you can also use a type wildcard (`?`).

Re:Why Type Systems Matter by kuschku on Friday August 18, 2017 @03:10PM (#15048931)
That is almost literally what Java does.

ArrayList<Map> myArrayList = new ArrayList<>(); works already today.

Re:Why Type Systems Matter by conwaysgame on Friday August 18, 2017 @02:58PM (#15048831)
Note in Java8, you could just use:

ArrayList<Map<String,Object>> myArrayList = new ArrayList<>();

Re:Why Type Systems Matter by shock on Friday August 18, 2017 @03:05PM (#15048895)
The diamond operator is available since Java 7. Tripped me up too.