From: Alexey Verkhovsky Date: 2005-09-27T11:18:26+09:00 Subject: Re: Fwd: Lisp macros Joe Van Dyk wrote: >On 9/26/05, Devin Mullins wrote: > > >>The big thing Lisp has that Ruby can't do is code-as-data. I wish I >>could provide a good example of how that might be used practically, but >>it's been quite a while since I touched lisp. >> >> >If anyone wants to chime in with an example of what code-as-data is or >how it could be used, I'd appreciate it! > > --- foo.properties --- foo_name = 'MyFoo', foo_description = 'A code-as-data foo' foo_question = 'Why is this useful?' foo_answer = "Ah, well, sometimes it is" --- foo_properties_loader.rb --- puts File.read('foo.properties') puts load 'foo.properties' puts foo_question puts foo_answer :) Alex