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



On Wed, Jun 28, 2017 at 4:30 PM, <dlclark@xxxxxxxxxxxxxxxx> wrote:
"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 06/28/2017 04:23:27
PM:
there is just so much more work the programmer has to do in RPG than
other
languages.

First things first. If we take the above statement at face value, it's
true. It's also true that there are some things that you can do in RPG
that require a lot more work in other languages (a quick example was
pointed out by Joep Beckeringh).

What might be an uncomfortable truth for some in the RPG community is:
There are some pretty significant things that RPG simply isn't good
at. It's not dynamic and it's not object-oriented, so if you need
those qualities, RPG is going to be a very poor fit. Likewise if you
prefer or need to program in a functional style (we're not talking
about subprocedures-as-functions, we're talking Haskell, ML, and
arguably Lisp).

And, to be fair, there are plenty of other languages that aren't good
at those things either. It's the reason so many languages kept being
invented, and still continue to be invented.

So, on to one thing that gets my goat:

You might fool some with that, but do you actually know how much
JavaScript code is behind that $ function you threw in there so casually?
We're talking thousands of lines of JavaScript code. You can achieve the
same encapsulation using RPG service programs.

Practically every usable language has a way to encapsulate a bunch of
functionality somewhere else so that by the time *you* have to use it,
it's just a simple function call.

But what does differentiate languages in this regard are

(1) What kind of library functions are already included, so you don't
have to write them yourself? If it's in the standard library, it
doesn't matter if it's a hundred thousand or a million lines of code.
It doesn't matter if that library code is written in assembly or MI.
It's not useful to say "your code example really includes 423,598
lines of code when you count all of it". No, it doesn't. If *you* just
have to write 6 lines, then it's 6 lines of code.

(1a) What kind of libraries are available in the "ecosystem"?
Nowadays, many languages on the mainstream platforms let you type one
line at the command prompt to find, download, and install a package
onto your system from the Internet; and then *use* that package in
your program by a single import statement at the top. RPG can't touch
this. At least not yet. There are folks working on it, most notably
Liam Allan and his Relic package manager.

(2) How difficult is it to write *and use* your own
functions/procedures, for those cases where it's not already provided
or easily available? Some languages make it much easier to do than
RPG. This is largely a dynamic-versus-static thing, rather than a
JavaScript-versus-RPG thing. Traditional statically typed languages
have an inherent overhead in their declarations. Note that for a long
time, RPG even had that silly thing where you had to duplicate the
prototype just to make a simple function to use within the same
module. Fortunately they did away with that. Of course, the source
code overhead of static typing does buy you some benefits (better
compile-time checking and usually better performance). The larger the
program, the more value you get from these benefits.

So, the point of all that was just to say that, whether you like
JavaScript or not, and whether you think Steve's example was fair or
not, or relevant or not; it absolutely doesn't make sense to attack it
on the grounds of "amount of code that was used to implement the $
function".

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.