Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Exception Safety, Garbage Collection etc. (a.k.a. Why Does Java Suck So Bad?). Parent comment
public void withConnection(Callback<Connection> callback) { Connection connection = createConnection(); try { callback.call(connection); } finally { connection.dispose(); } }
Once Java actually gets closures it'll make this soooo much nicer.
There are no comments on this comment yet.
public void withConnection(Callback<Connection> callback) { Connection connection = createConnection(); try { callback.call(connection); } finally { connection.dispose(); } }
Once Java actually gets closures it'll make this soooo much nicer.