On Oct 24, 2008, at 2:23 PM, Caleb Clausen wrote:

> == Benefits:
> * Powerful and easy metaprogramming
> * Create better DSLs
> * Manipulate syntax trees to suit yourself
> * Access local variables and other caller context unavailable to  
> methods
> * Macros as inline methods: should be slightly faster than  
> equivalent methods


only manipulating the syntax tree seems like a real advantage from  
here, generating a dsl is already as nearly painless as it could be in  
ruby, and methods do in fact have access to local variables and other  
caller context

cfp:~ > cat a.rb
def context &block
   eval 'a += 40', block
   block.call
end

a = 2
context{ p a }
p a



cfp:~ > ruby a.rb
42
42


can you show us something that cannot be done using ruby currently,  
which macros make possible?


cheers.


a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama