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



When you RCLACTGRP all memory allocations, commitment definitions,
overrides, programs, procedures, global storage etc... initiated within the
activation group and (specifically commitment definitions and overrides)
scoped to the activation group are destroyed. (cleaned up)

Duane Christen

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Joe Pluta
Sent: Tuesday, October 09, 2007 8:31 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: will v6r1 RPG support main procedure recursion?


From: Steve Richter

( On the .NET vs i5/OS front, the comparison that I am interested in
is languages that garbage collect vs those that dont. C++
used to be
important. Almost overnight, with the adoption of managed code by
MSFT, it is legacy because it does not GC. Garbage collection in RPG
would work really well for its many business oriented
programmers. )

Okay, I'll relax the restriction for just a moment and answer
this question
even though you again are talking about a technical issue that really
doesn't matter to application programmers.

Why do you think RPG needs garbage collection? The only
reason you need GC
is when the programmer dynamically allocates memory outside
of the OS and
doesn't give it back. In OO languages this is an absolute requirement
because of the creation of millions of transient objects
which are never
explicitly destroyed, but in procedural languages it's
unnecessary. The
only reason you need GC is if you start adding a bunch of
dynamic memory
allocation, and frankly that's why I don't want RPG to start
looking like
Java - I don't need all that extraneous crap. If I need
objects, I'll use
Java. If I don't, I'll use RPG.

Now, in order to make OO virtual machines work outside their
sandbox, there
are GC issues, which is why most folks don't do it. At the
most, they might
let Java call their native non-Java functions (through JNI),
but rarely vice
versa. In a rather stunning architectural achievement unlike
any other
operating system that I'm aware of, the i5/OS interface
between RPG and Java
has support to directly invoke Java methods, and thus there
is a need to
directly invoke the GC functions -- which IBM has provided
and which Barbara
has kindly shown in specific detail in other posts.

So, again, the question is simple: why does RPG need GC? If
it doesn't have
OO and you occasionally allocate your own data structures,
then you can
clean up after yourself. And if I'm not mistaken, you can even use
activation group boundaries to clean up for you -- I believe
(but I'm not
sure) that any memory allocations done by a job are released when the
activation group ends. Maybe someone more knowledgeable like
Scott, Bruce
or Barbara can chime in.

Joe

--
This is the RPG programming on the AS400 / iSeries (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.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named. Any use, copying
or disclosure by any other person is strictly prohibited. If you have
received this transmission in error, please notify the sender via e-mail.




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.