× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>> Why, oh why, is RPG adopting pointers, the single greatest weak point of
C++

Because there are certain classes of problems that cannot be solved without
them.

A language like Java can get by without them because it is object oriented
and, by building new classes, you can extend the language but somewhere down
in those classes somebody has to write in "C" or some other language with
pointers. The java class just hides it.

These are options that RPG ILE does not have so you have to have pointers. I
find to write many types of service programs, you just cannot get past them.
Any type of dynamic memory allocation (linked list, etc). 

Your message does point to the same fear I have. Pointers usage, in my mind
anyway, should always be encapsulated in a function and hidden. Using
pointers in the general body of a program is scary to me and, of course,
there is always that fear that someone will misuse a powerful tool. 

>> I'd bet the major reason he's still running the code is because the
original code was
>> bleeding edge at the time it was written but now it is just a footnote of
poor techniques
>> that no one understands, or, if they understand it, won't admit to.

I'd bet the opposite. Written as a maze of indicators completely
unmaintainable and no one has a clue what it does and terrfied to touch it
for fear it will quit working. 

I have never seen a piece of unmaintainable code that was written with some
kind of leading edge technology. Always the opposite. 2 or 3 thousand line
mainlines with the same logic repeating 10 times in 10 different versions
and one thousand line subroutines doing twenty different functions and all
doing what could have been done in a few hundred lines of code if properly
designed. Why engineer code when you can just start pounding code?

I worked on one package that had a piece of logic to convert from a quantity
to another quantity. Was non-trival but every single program that needed it
repeated the code in every program not once but the same logic, sometimes,
10 or 20 times in a program, just slightly different through hundreds of
programs. 

Now that's scary. 

-----Original Message-----
From: boothm@earth.goddard.edu [mailto:boothm@earth.goddard.edu]
Sent: Saturday, December 04, 1999 10:32 AM
To: RPG400-L@midrange.com
Subject: Re: Runtime KLIST change?


Are you making this more complicated than needed?  Why not define KLIST1 
and KLIST2 as you've described and then define KLIST3 as pointing at NULL 
and, when you need to point to NULL, use KLIST3 as the KLIST in your 
program.

But aside from that your message struck terror into my heart.  Why, oh 
why, is RPG adopting pointers, the single greatest weak point of C++? 
Aren't the disasters of PARMs as pointers enough of a lesson to IBM?  My 
initial reaction to RPGIV is reinforced every time I see a message like 
this message.  I don't know Frank at all, and I have no idea what problem 
his program resolves, but I do know a lot of shops that would have no idea 
of how to maintain the program he's describing.  Not only have no idea, 
but they'd be belligerent that it was even in their shop. 

I mean no disrespect, nor do I feel I am ignoring technological advances. 
I do however remember seeing a post a few days ago from someone still 
running some Sys/36 code.  I'd bet the major reason he's still running the 
code is because the original code was bleeding edge at the time it was 
written but now it is just a footnote of poor techniques that no one 
understands, or, if they understand it, won't admit to.

_______________________
Booth Martin
boothm@earth.goddard.edu
http://www.spy.net/~booth
_______________________




Frank Steinjan <fstone@wtal.de>
Sent by: owner-rpg400-l@midrange.com
12/04/1999 03:12 AM
Please respond to RPG400-L

 
        To:     RPG400-L@midrange.com
        cc: 
        Subject:        Runtime KLIST change?

Hallo,

as V4.4 offers more and more possibillities I would like to know if
there is any trick to handle different KLISTs in an RPG-Program. I had
the following problem:

I wanted to use file file_x1 and file_x2 within the same program.
KLIST of x1 consists of field_a and field_b while x2 consists only of
field_b.

What I wanted to do is to define field_a and field_b as pointers where
in case of file_x2 field_a points to NULL. But this doesn't work.
Perhaps someone outhere can gimme a hint.
Thanx in advance...

Frank


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.