Lex and Yacc are tools to generate a parser. They use an abstract
input language to produce specialized code you could have written by hand
but that would take a lot of time.
Code generation is a mechanism to produce sourcecode you otherwise
had to type in by hand. True, you probably can design away some of it by
using patterns and class hierarchies, but I estimate not more than 50% of
what you have to write.
Depends on the language. With a good language, you can eliminate
almost
all the redundant code and supply only the relevant information.
That's at least 50% left to type in by hand. Now,
I don't know but when I have to chose between a click of a button to
produce that code or typing it all in by hand, I will opt for the button
click. However, perhaps you love typing repetitive code for hours and
hours, I don't know
You can reduce labor by wrapping source code patterns up in some
magic, and generally undocumented code generator, forever tying your
application to some IDE, or you can wrap that same source code into a
high-level object library.
And when the code generator won't generate the code you want, you're
stuck.
Besides, we're not really talking about code generators like lex and
yacc,
which are really language compilers. We're talking about generating
part
of a class through some IDE. Instead of creating ever more
complicated IDE's,
it would be better to create ever more powerful libraries.
Is that the new spec or is it the new "draft" spec.........hmmmm
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.