Arc Forumnew | comments | leaders | submitlogin
3 points by Darmani 5562 days ago | link | parent

Things like w/open-file, w/stdout, w/uniq, even perhaps aif and friends, I'd classify as "around code" rather than "resource management."The basic principle behind these is that we do some initialization (e.g.: opening a file), run some code, and then do some terminal work (e.g.: closing a file).

Ruby does similar things with blocks (c.f.: File#open), and I beleive Python has a specfic structure for this kind of thing.



1 point by jonnytran 5560 days ago | link

Good point. "Around" is a concept used a lot in aspect-oriented programming. But I suspect that even fewer people are familiar with AOP or "around" than with macros or resource management.

-----