× 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.



I think we are more in agreement than not.

Yes, RPG pointer support is nothing like C pointer support.  However, I was 
commenting about no pointer support versus what has been implemented.  If the 
RPG IV compiler team were to implement additional pointer support, it would 
make my day! :-)

Regarding pointers being overused, I can comment only for myself, and I plead 
"not guilty."  I use them to accomplish what can't be accomplished nearly as 
easily in other ways or when they give me significant performance advantages 
over the alternatives.

I agree that many RPG programmers have trouble with pointers, as do many C, 
Pascal, etc. programmers.  Pointers are tools, like any other.  The user has to 
learn how to use them properly or suffer the consequences.  Programmers that 
find pointers beyond their grasp, can and should, as you said, choose not to 
use them.

I still think the pointer we have today was a very good idea and thank you very 
much for whatever part you played in bringing it to us.

Cheers,

Mel Rothman
IBM eServer Custom Technology Center (eCTC), Rochester, Minnesota
http://www-1.ibm.com/servers/eserver/iseries/service/ctc/


Hans Boldt wrote:
>
> Mel wrote:
> >Hans, I don't think "adding pointers to the language was a bad idea."
> >
> >You should be taking credit, not blame, for adding them.
> >
> >Many things that would be difficult or impossible to do without pointers
> >are relatively easy to do with them.  For example: dynamically allocated
> >storage, using many system APIs and C functions, navigating complex
> >structures, handling blocks of data larger than 32767 bytes, etc.
>
> Two points:
>
> First, RPG pointer support is nothing like pointers in, say, C.  In
> C, pointers are typed, and so the compiler can complain about type
> mismatches, which can save lots of potential headaches.  Pointers in
> RPG are untyped.  It's a lot more difficult to debug pointer problems
> in RPG than in C.  (And C is hard enough as it is sometimes!)
>
> Second, I believe pointers may well be overused in RPG.  Sure,
> they're great when you have to call some API.  But beyond that, I
> wonder if they're being used just because they might offer some
> "cool", "geeky" way to implement some function.
>
> For example, if you need to manage some varying sized amount of data,
> there are several different ways to handle it.  If you're dealing
> with a compute-bound application (like a compiler), a reasonable
> approach would be to use a linked list, using pointers and malloc's.
> But application programs typically are I/O bound, not compute bound,
> and so program performance is less of a concern.  In this case, a
> table in a database would be easier to understand and easier to
> maintain, along with other advantages, like persistence.
>
> In other words, just because you have some capability, it doesn't
> mean you have to use it.
>
> The essence of good software engineering is not just knowing how to
> use some tool, but also knowing how NOT to use it.
>
> >rpg400-l messages indicate that many RPG IV programmers are using them
> >to great advantage.
>
> ... and often having lots of problems with them.  :-(
>
> Cheers!  Hans
>
> Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.