From: Gregory Brown Date: 2006-01-09T06:22:43+09:00 Subject: Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? On 1/8/06, James Britt wrote: > Gregory Brown wrote: > > On 1/8/06, James Edward Gray II wrote: > > > > > >>>This is definitely a point worth making, that *most* people know that > >>>meta-programming is dangerous stuff > >> > >>If you are compiling this information for a written piece, I suggest > >>beginning with some definitions. I do not consider the above example > >>metaprogramming, for example, just a violation of encapsulation. :) > > > > > > Well that depends on who put the secret value there, doesn't it? ;) > > > > But good point. How would you (the community) define > > meta-programming, open class system, and the dynamic nature of ruby? > > An element (the key element?) of meta-programming is the creation or > modification of methods, classes, and modules based on runtime > information. I.e. run-time introduction of new behavior. > > So, as JEGII pointed out, merely bypassing encapsulation is not > metaprogramming by this (rough) definition. How does this sound for a definition: "When code is designed to dynamically write or modify it's own code or other code, this is considered to be Meta-programming. This often makes heavy use of reflection and introspection, two key tools for dynamic manipulation of code."