SPUG: Self-generating code: yea or nay? (was: Dijsktra is Dead)

Asim Jalis asimjalis at yahoo.com
Fri Aug 9 15:21:19 CDT 2002


Richard Anderson wrote:
> [A]re 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?

Here are some examples:

- SWIG and also Inline::*
  Generate wrapper code for embedding one language
  into another. 

- Class::Struct, Class::DBI 
  Generate subs for setters and getters for a
  class's fields. Class::DBI generates code so
  database rows can be accessed almost like
  objects.

Code generation's sweet spot seems to be where you
have to write a lot of routine mindless code,
frequently to wrap access to something.

Are there any examples of Code Generation where it
is used to non-routine non-mindless code?


Asim

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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