Re: Purpose of Macros

2010-11-29 Thread Ken Wesson
On Mon, Nov 29, 2010 at 6:28 AM, Petr Gladkikh wrote: > On Mon, Nov 29, 2010 at 3:29 PM, Ken Wesson wrote: >> In Java, you often have to pair things, e.g. opening a file and >> closing it, to avoid leaking resources like file handles. >> >> These pairings are among many cases where Java code cont

Re: Purpose of Macros

2010-11-29 Thread Petr Gladkikh
On Mon, Nov 29, 2010 at 3:29 PM, Ken Wesson wrote: > In Java, you often have to pair things, e.g. opening a file and > closing it, to avoid leaking resources like file handles. > > These pairings are among many cases where Java code contains structure > that you can't extract and reify in your pro

Re: Purpose of Macros

2010-11-29 Thread Ken Wesson
In Java, you often have to pair things, e.g. opening a file and closing it, to avoid leaking resources like file handles. These pairings are among many cases where Java code contains structure that you can't extract and reify in your program. Macros make it possible to extract any such pattern, r

Purpose of Macros

2010-11-29 Thread Andreas Kostler
I'm watching Richs' excellent Clojure for Java developers videos. One comment he makes puzzles me though. He is elaborating about how powerful macro abstraction is. The specific argument he gives is closing files in Java and how macros save you typing the exact thing. I don't quite get what he mean

Purpose of Macros

2010-11-29 Thread Andreas Kostler
I'm watching Richs' excellent Clojure for Java developers videos. One comment he makes puzzles me though. He is elaborating about how powerful macro abstraction is. The specific argument he gives is closing files in Java and how macros save you typing the exact thing. I don't quite get what he mean