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:
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.
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.
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!
|
|---|