come on dude, you sure you wouldn't rather type: File f = null; try { f = File.open("/tmp/bs"); //do-stuff } catch(IOException ioe) { //die! } finally { if(null != f) { try { f.close(); } catch(Exception e) { //eat-it } } } than: File.open("/tmp/bs") { |file| //do stuff } (that's my favorite example btw)
Yeah, so I like blocks better then the above ;)
1 comment:
Next thing you know, you'll be making little sniping remarks about Java like that one dropped at the OSCON Streamlined talk: "Right about now, your average Java developer is wetting himself." ;)
Post a Comment