From: Aleksei Guzev Date: 2001-10-25T21:01:21+09:00 Subject: [ruby-talk:23285] RE: Ruby macros Parameterized classes are "object-oriented macros" ;) Macros are not needed while one can pass a class to a function. # -----Original Message----- # From: leo@oresha.nonet [mailto:leo@oresha.nonet] On Behalf Of Leo # Sent: 25 ??????? 2001 ?. 11:33 # To: ruby-talk ML; undisclosed-recipients: # Subject: [ruby-talk:23261] Ruby macros # # # Hi Ruby experts, # I think that some sort of macro system similar to one found # in Lisp or Scheme would clearly set Ruby over its rivals like # Perl/Python. In the past I did some programming in Lisp and # Scheme and I loved macros. They are very useful and some # times indispensable. Not having them in Ruby is IMHO a last # missing feature on Ruby's path # to world domination:) # # Seriously, Ruby already has powerful family of eval functions # where one can pass a binding as a parameter. It paves the way # for a class and instance specific macros like # # class MyC # defmacro myMacro(a, b, c) # `{....} # end # end # # obj = MyC.new # obj.myMacro A,B,C # # Object Oriented macro extensions should sound exciting!! # # It should not be that hard to implement macros using eval for # anyone who can comprehend how Ruby parser works:-) # # Any thoughts? # # thanks, # --Leo-- #