Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ansgri
on Jan 4, 2012
|
parent
|
context
|
favorite
| on:
A Programming Idiom You've Never Heard Of
The author is excited that functions have their inverses by default, I think. Analogous construct in Python would be somethoug like:
with_under do_something() as f: ...
translated to
f = do_something() ... f.undo_something()
With do_something automatically matched to undo_something.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: