News for hackers. Stuff that matters.
Re:Early exit is a tail call optimization of procedural lang... by jdmichal on Monday December 14, 2015 @03:25PM (#10733555)
Java has always allowed try-finally blocks, which is what a try-with-resources compiles down to anyway.

    Resource resource = new Resource();
    try {
        if (a)
            throw new Exception("Oops!");
        else if (b)
            return resource.doBStuff();
        else
            return resource.doStuff();

    } finally {
        resource.close();
    }

There are no comments on this comment yet.