|
I feel that you have a a good point, to an extent, about the value of making code easier to follow. HOWEVER... There are many times that spreading code over multiple lines actually makes it MORE DIFFICULT, to follow! A really good example of this is nested IFs, DOs, SELECTs, etc. In a free-form language, you can indent to clarify these things... to me that makes it much easier to read, debug and maintain. Also, I wonder why you're attacking C? Although its possible in C to make code hard to follow, its ALSO EASY TO DO IN RPG. Indicators make it easy to make bad code. How many legacy programs have you tried to work on where the output specs have as many as 4 lines of ANDed and ORed indicators?! Or indicators that are set on and off based on another group of indicators, that then affect other things in later iterations of the cycle? GOTO is another bad culprit. Of course, you can do this in both RPG and in C, but I find it much harder to avoid in RPG. And since you mentioned pointers and memory management, I'd like to add that you can do the same things in RPG that you can in C. Of course, RPG programmers don't do this very often because they're new to the whole concept, but that won't be true forever... And you can also let the compiler manage your memory, etc, in C just as you can in RPG! I think this boils down to whatever the programmer is accustomed to... If you're used to RPG, its better... if you're used to C, its better. Lets remember that C is the most widely used language in the world. RPG doesn't even rate its own area on Yahoo. :) Joel Fritz <JFritz@sharperimage.com> wrote: > Seems to me that the big problem with C (as far as maintainability a > readability, we won't talk about pointers and memory management) is > nut > behind the wheel one. It's what I call the vice of terseness--the > desire to > compress the largest number of program instructions into the smalles > amount > of source even when being more verbose would create executable code > that > looks exactly the same as the terse version. > > I like the free form idea, but I wouldn't mind being protected from > terseness abuse. > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. Questions should * * be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.