[Nitro] [OG] eval and style

transfire at gmail.com transfire at gmail.com
Wed Jan 31 17:04:42 EST 2007

On Jan 31, 3:53 pm, "nya... at gmail.com" <nya... at gmail.com> wrote:
> I'm reasonably new to Og, although I've followed Nitro + Og for some
> time.  Now that I'm digging into Og for my own purposes, I have some
> questions about the way it's structured.
> Mostly, I'm curious about the decision for the #enchant methods to
> eval strings on the target classes.  Is there a reason to prefer this
> over eval'ing a block, and doing the string interpolations in
> define_method calls?  If nothing else, this buys nicer backtraces that
> go through the #enchant results.

It should be minimized (IMHO) I spent some time a year or so ago
reducing the str evals in Og. In some cases it's rather difficult to
do however. In any case, if the str evals are adding code directly to
the classes (still!?) then that needs to change _very badly_. I've
pointed this out to George. The quick solution is to eval the stings
into a module instead and include the module into the class. But
eventually, I agree with you that replacing all but the essential str
evals with dynamic evals is the way to go.


More information about the Nitro-general mailing list