|
On Tue, 13 May 2003, Tom Liotta wrote: > >It's not the place of a programming language to add domain specific > >functionality into the base language. For example, should RPG have a > >compound interest BIF? or a set of accounts payable BIF's? > >But has it? By your evasiveness, can I assume it *still* doesn't > >have that basic functionality? The Python programmer can easily find > >the functionality for escaping text in HTML in function cgi.escape() > >or the functionality for URL encoding with function urllib.quote() > >(among others). > > > >My point is that the CGI RPG programmer is missing some fundamental > >functionality in the available procedure libraries. Functionality > >that programmers in other languages like Java and Perl and Python > >take for granted in their class libraries. Functionality that's > >necessary for the majority of CGI programs. > ...then, for RPG, wouldn't we look to %bif()s for similar functionality? > or, perhaps better, to system service programs/APIs? I'm not clear > whether IBM supplies "procedure libraries" that fit the bill for RPG. No. Unless I'm mistaken, the cgi.escape() and urllib.quote() functions in Python are not operators, but function calls. Python provides a way to call functions and then someone put together a good function. But a %bif() is more operator than function because the compiler writers have to write it. To get the same Python functionality, write a cgi.escape() function for RPG. IOW, cgi.escape() is not the Python equivalent of a %bif(), why should the RPG version be? I believe part of Hans' point is (trying not to put words in his mouth here) that a reason why Python excels for writing web apps is that there are a lot of functions written that help the web app writer *and those functions are not operators written by the compiler writers*. They were written by several people who needed them and then lumped them in with the Python distribution. There is no reason why the same couldn't happen with RPG (though a set of functions probably wouldn't be distributed with RPG itself, but rather as a seperate feature). I think it is the wrong approach to look to the compiler to do what we can do easily (and maybe better) ourselves. James Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.