14:41:40_death20 years ago people played jokes on irc newbies telling them to join #2,000 or somesuch, and upon trying, their irc client (mIRC) would part the current channel
17:09:31takitusdefer: Because functions need lots of hidden state :)
17:10:04dloweif the hidden state in defer bothers you, you should make smaller functions.
17:10:57dloweAnyway, it sure beats objects with destructors.
17:21:02takitusdefer is one of Go's weirder ideas. The authors present it as a better solution to the 'goto cleanup' trick common in C functions, but building a stack of statements to execute when a function returns (somewhere) seems very abuseable.
17:22:26takitusIt's a very imperative solution to a very imperative problem :)
17:39:34takitusdlowe: It's certainly better than those C idioms. defer still seems a bit dirty.
17:40:35dimdlowe: I meant the other way round, if you want with-defer in Go you have to wait until the language designers make it happen, or in Java, or etc... whereas you could just make it happen
17:41:01dimah and that's exactly what you said, after the "bothersome" line