Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: A meditation on the naming of perl6

by BrowserUk (Patriarch)
on Jul 12, 2017 at 03:02 UTC ( [id://1194887]=note: print w/replies, xml ) Need Help??


in reply to Re^4: A meditation on the naming of perl6
in thread A meditation on the naming of perl6

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1194887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found