If you'd care to suggest how to "generate" interfaces to the 7 new AWS apis introduced just in the last week, I'm sure they'd be all ears.

That said, ime, code generators are the very worst of all worlds. A cool sounding idea, but they take longer to specify; much longer and far more coordination and discipline to code; are hugely more complex, thus contain far more bugs; and are truly horribly complex and difficult to debug. Instead of just writing code to interface to the vendor specified api; you have to:

  1. Write a parser for the vendors api specification notation.

    And vendors specifications are rarely self-consistent, let alone rigourous. Every time the vendor releases a new api, you have to modify the parser to accommodate it and all its vagaries without upsetting any of the previous parsing. That's not just difficult, it can be simply impossible. Vendors are under no obligation to write consistent or even cross-compatible apis or specifications thereof.

  2. Then you need a code generator that can produce working and consistent code whilst mixing and matching any and all possible combinations of api sequences.

    That's an MM-1n combinatorial problem for testing and verification. Ie. impossible to test without you write a generator and test statistically; which simply compounds the problems further.

  3. Debugging is a nightmare.

    First you have to reproduce the bug as normal and then find the cause. If you're lucky, manual inspection of the input will tell you what is wrong, but not how to fix it. Most times you'll need to inspect, trace and debug the generated code, which is invariably verbose, badly formatted, illogically composed with massive duplication and cut&paste code reuse.

    And once you find the cause and work out a fix at that level, you've then to work out how to modify some combination of the parser and code generation to implement that fix. 7 out of 10 times that means adding a special case 'recogniser', post-tokeniser but pre-generator to output a boiler-plate sequence in place of what would normally be generated.

And if you've had to add an optimiser stage in order to make the generated code run at anything like reasonable performance; you've compounded all the problems once again.

In short: Yuck!


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit

In reply to Re^5: A meditation on the naming of perl6 by BrowserUk
in thread A meditation on the naming of perl6 by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.