It's been quite a while since I've been an RPG programmer. Now I'm back with it for a month or two, and I can't say that I'm liking it much. I've become accustomed to loads of nice things that I no longer have available.
Firstly, there's the language itself. RPG is ugly, inexpressive and fiddly. I think that these are somewhat related - to quote ESR, Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.
A few examples: Opening a file in anything but the most standard of ways involves fiddling with an unholy mix of F, D and I specs, all of which are column oriented records, and all of which need to be located in different parts of the source deck. The C specs don't have to be column oriented, but I've yet to see the new free format RPG used in anger. Using the old style column oriented C specs, if your expression gets too long, it'll end up running into the comment column, and will be ignored. If you're unlucky, the compiler won't notice, and your expression will compile with a bit missing. This gets picked up in testing, of course, but there ain't no jUnit for RPG.
There's a narrow range of activities for which RPG works reasonably well, and it must be said, it's very well integrated with the iSeries's built in database. The iSeries is pretty much an accountant's machine, and you can build the applications that you want with RPG, I suppose. But all the fiddling leaves you with appalling productivity.
Then there's the standard library. Or, to be more specific, the complete and utter lack of one. Java has a huge standard library, and Python's standard library is either even larger or much smaller, depending upon whether you are talking about functionality, or lines of code. ;-) And if I can't find what I'm looking for in the standard libraries, well, Google and PyPI are my friends, and there's almost always something to download. RPG, on the other hand, has no standard library at all, and there's little stuff on the 'net. RPG does support software components, just about, but there isn't a community making stuff available. So, every project reinvents its string and date handling, for example.
Lastly, there's the development environment. The site that I'm at, just like every other iSeries site that I'm aware of, use the SEU source editor, which is out of the Ark. This is particularly irritating, because there's a fantastic Eclipse-based replacement, WDSc. This comes as part of the same WDS bundle as SEU does, so if you have one, you have the other - but no one uses it!
In short, if you catch me whinging about Java again, just slap me.Posted to iSeries by Simon Brunning at April 05, 2004 01:54 PM