News for hackers. Stuff that matters.
Re:Why I’m not leaving Python for Go by draven on Monday September 24, 2012 @05:21AM (#4563854)
The python mechanism is more general, you can use the /with/ construct with locks for example.
Re:Why I’m not leaving Python for Go by andrewaylett on Monday September 24, 2012 @05:30AM (#4563869)
You can do the same with Java. Both are in a sense trying to re-gain the most useful parts of RAII semantics from C++: making it much more difficult to forget to clean up resources after you've finished with them.
Re:Why I’m not leaving Python for Go by draven on Monday September 24, 2012 @10:51AM (#4564939)
Or the unwind-protect faciliy from Common Lisp, that is "cleanup stuff before it goes out of scope"