From: James Britt Date: 2005-03-30T06:26:47+09:00 Subject: Re: attr : B. K. Oxley (binkley) wrote: > What is the difference between these two approaches? > > * Is one more 'culturally correct'? > * Does one perform better? > * Is one more future-proof? James prefers Florian's way for real-life usage. James wrote his as a sort of "Here's a simple example that may help show what sort stuff is going on" thing. In general, 'eval' is risky because, if you're not careful, you'll execute the wrong raw code. It can also be harder to debug because you're looking at code + code-in-strings, so the actual intent may be obscured. The eval example is perhaps more useful for someone looking to hack around to see what else can be done using assorted meta-coding and such, but overall you are probably better off if, once you've decide what to accomplish, you find a non-eval way to do it. James