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



 <snip>
> I ought to say this:  as with so many things, there is no single right
> solution.  creating a data structure for one parm in a standalone
> application would seem silly.  Using the data structure is just one
more
> bullet in the programmer's gun belt, imho.

The question is:  if he uses that bullet, will he shoot himself in the 
foot?
</snip>

LOL that's just too hilarious!!!


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, October 27, 2005 3:17 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Passing Parms


> Isn't this a lot easier than tracking down all the programs that would

> need lines of code changed, too?

Why not make the recompiles unnecesary?  Wouldn't that be less/easier
maintenance?  I suppose you enjoy mass-recompiles?

Suppose you have 50 computers to deploy the changed program on.  Now you
have to find out, on each computer, which programs call the one you've
changed, and you have to recompile/replace them all.  And this all has
to be done while nobody is using any of them. Isn't that a lot of work?

What if those computers aren't all under your control. What if you sell
software to (for example) cleanse an address.  The client has written
software that calls your program from their own code.  Now you
change/add a parameter to your program, and you have to ship out a new
copy to every customer, along with a new copy of the file that the ext
data structure is based on, and get every customer to recompile all of
their programs that call yours.

Because of this, people will resist installing the update. They'll put
it off.  In the mean time, you have to support bugs in the new version
AND the old one because the customers need time to make the changeover.

You could've eliminated all of this simply by making it so that the
calling programs DON'T NEED TO BE RECOMPILED. And that's much easier to
do with single parameters than it is with data structures.

Furthermore, since single parameters are all independent of one another,
you can lessen the impact of changes so that it affects fewer people if
you use single parameters.

I realize that not all of the things I've listed here apply to everyone
who writes programs -- but you haven't listed a single reason why data
structures work better.  Indeed, your only argument so far was for using
externally defined fields for parameters!  That can be done with single
parameters as well as data structures.

You still haven't told me why data structures are easier to maintain!
How do they make maintenance easier?

The advantage to data structures is that you can group fields together
when they belong to a "set" of fields.  For that, data structures are
brilliant.  It's exactly what they're intended for.

But simply passing all parameters as data structures as a rule of thumb
doesn't make any sense to me.


> I ought to say this:  as with so many things, there is no single right
> solution.  creating a data structure for one parm in a standalone
> application would seem silly.  Using the data structure is just one
more
> bullet in the programmer's gun belt, imho.

The question is:  if he uses that bullet, will he shoot himself in the 
foot?

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.