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



To elaborate some more on this :

"event-driven", "object-oriented", "functional" are programming STYLES.

You CAN do OO programming in RPG (or assembler), the language is just not
very suited for it.

You also CAN do functional programming in RPG, or Java (but both are not
very well suited for it).


Although i agree on most you said, Scott, i wouldn't call RPG an
event-driven language (and never was).
You probably mean the cycle, which has all kinds of "events" happening such
as level-break etc.

I don't think there is a real definition what constitutes "event-driven",
but it is a programming style which is NOT tied to GUI programming
(although here it is very helpful).

For example, the main part of a (RPG) program handles user input, such as
command keys.
You could see these as "events" which cause a specific subroutine to
execute. If the main part simple checks to see what command key is pressed
and then simply calls a subroutine to handle it you already have an
event-driven program. You just have to see it that way.

So you could say that RPG was event-driven all along because there are some
pre-defined events (such as total-time happening) which exectutes some code
associated with it. But event-driven means that those "events" can happen
any time, in no specific order. Some events may happen never, and others
1000 times repeated. There is no pre-defined structure. And the RPG cycle
sure has a predefined structure in which these "events" happen in a well
defined order (and only once etc).

The idea of events is to decouple "the event" and "the code". This could be
applies in all sorts of situations.

You could say that RPG was state of the art in 1959 because it was (the
first?) "4GL" (declarative) language with which you specify on a high-level
what report to produce.



On Mon, Feb 20, 2012 at 11:19 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hello,

- RPG is not a modern language!

As far as I can tell, this is just your opinion, right? Is there a
formal definition of what constitutes a "modern language" that RPG does
not meet?


- RPG is not state of the art and it has never been!

You could say this about any language.


- RPG is just an improtnat language for one platform, I like (the
platform) and maybe some others too

So...? C# is only important for one platform, too, as is VB.NET or ASP.
What does this have to do with whether it's a modern language?


- even ILE RPG 7.1 has severe drawbacks!!!

Every language, every environment, has it's pros and cons.


just to name some of these:
- it has no sufficient support for namespaces

Namespaces? Are we talking about Java package names, or XML, or what
are we talking about here?


- it's not prepared for event driven programms, because it has nos
support for multi threading (yes, I know the keywords for the
H-specs)

Multi-threaded and event-driven are two completely different things.

1) RPG does fully support multi-threaded applications as of 6.1. I've
written some. They work. However, it's really hard to find a business
scenario where writing multi-threaded programs is useful.

2) RPG has always been event-driven. That's what the RPG cycle was (and
is). Granted, that looks a lot different from the way event-driven logic
looks in younger languages like C# or Java. However, you can easily
create an event-driven architecture similar to these younger languages
using callbacks. You just have to write your own "main event loop" (much
as you would in C.) The big problem here is not the RPG language, it's
finding a place where this type of architecture applies. RPG has no
native GUI, and that's really the main place where event-driven
architectures are typically used.


- the compiler does not support error handling

I think you're confusing "does not support" with "doesn't work the way
Dieter wants it to".


- static binding was an outdated concept, at the time it ws introduced
to ILE RPG

True, but it's rare that this issue comes up, and it's easy enough to
work around when it does. How many programmers in the RPG community
have encountered this issue? What percentage of the whole? I doubt
very much that it's as high as 1%.

- it's complicated to have multiple connections with embedded SQL
(yes, I know, what an activation group is!)

True. But, again, how often do you need to do this? How often do you
want to connect to two database servers at the same time? If you do,
RPG does support both ODBC/CLI and JDBC (just has other environments do)
you don't _have_ to use embedded SQL.

Coding SQL statements in RPG with embedded SQL is significantly easier
than coding SQL statements in languages like Java, C# or even PHP. If
you code SQL in RPG using ODBC/CLI, then it's very similar to the way
you'd code it those other languages.

So, once again, you have pros and cons. Do you want simplicity or
functionality? It's a trade-off.

- it's not supported to controll activation at runtime (yes, I know
ACTGRP(*NEW))

Is there another language that does support controlling the activation
at run-time? I suppose Java would if you wrote your own class-loader...
but that's about it.

- there are very few components available (yes, I know, there are
some - I'm one of the guys publishing Open Source and Freeware!)

This says more about the RPG community than it does about the RPG
language.


- there are no development tools which are competitive with Eclipse
(yes, I know WDSC or RDI, or how it might be named today, but where
is refactoring???)

This, again, says more about the community than the language.


There are pros and cons to anything you do in life. Choosing RPG vs.
another language is just one more example of that. There are things that
are good about RPG (better decimal support, better database support,
better security, better stability, better performance, easier to write
business rules, etc) vs other languages. There are also things that are
better about the other languages (larger communities, more add-ons,
platform independence, etc.)

Everyone needs to decide what's important to them (and their shop) when
determining their career path.

If you prefer other languages such as Java, go ahead and code in Java!
Neither us, nor IBM, is stopping you.

But, the fact that you prefer Java doesn't mean that "RPG is dying" or
that "RPG is not modern". It just means you've evaluated the pros and
cons and chosen the one you like better. (and so have I!)
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.