[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Macros Make Me Mad
Sundar> Thanks Neel. I agree that the integration of SQL w/ the language
Sundar> datatype *is* the big win (and loss) w/ PL/SQL.
Unfortunately, the integration in this specific case is surprisingly
bad, because you can't abstract over many entities of the sublanguage,
i.e. tables or the names of fields, which in practice leads to the
worst rashes of code duplication I've ever seen (at least when used in
industry). You can essentially only stick verbatim SQL code in your
PL/SQL program.
Agreed. But the procedural API's (such as JDBC/ODBC, SQLJ etc. are not
much better). Java is particularly bad in this respect, and results in
equal (or worse) amountts of code duplication because you can't easily
write before/after methods. Some say this is due to lack of true
closures, some say it's because of "try/catch" semantics .. which do
not interact well w/ procedural API's for controlling transaction
boundaries.. whatever.
What *is* the solution you would prefer or advocate? Just curious,
There is "dynamic SQL" in PL/SQL but that means you have to assemble
strings containing SQL code which is just as bad as most other SQL
bindings for high-level languages.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla