SPUG: Self-generating code: yea or nay?
dancerboy
dancerboy at strangelight.com
Fri Aug 9 15:00:28 CDT 2002
At 10:25 PM -0700 8/8/02, Richard Anderson wrote:
>Speaking of unstructured coding, I recently updated the online grep/map/sort
>tutorial and added the example below. This got me thinking: are there any
>cases where self-generating code is "better" (in some sense) than the
>alternatives? I feel the answer is no - can anyone provide a
>counter-example?
Depends on how narrowly you define the "self" in "self-generating".
It's often much simpler to translate user input into perl code and
then eval that generated code rather than parsing the input directly.
-jason
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list