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






> Destructors are only required for garbage-collected languages

C++ has destructors. Yet it isn't a garbage-collected language.

Regards.

--
Antoine CONTAL



                                                                                
                                                       
                                                                                
                                                       
                                                Pour :   "'RPG programming on 
the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>            
                                                cc :                            
                                                       
                                                Objet :  RE: Future of RPG      
                                                       
             "Joe Pluta"                                                        
                                                       
             <joepluta@xxxxxxxxxxxxxxxxx>                                       
                                                       
             Envoyé par :                                                       
                                                       
             rpg400-l-bounces@xxxxxxxxxxxx                                      
                                                       
                                                                                
                                                       
                                                                                
                                                       
             09/11/2004 18:46                                                   
                                                       
             Veuillez répondre à RPG                                            
                                                       
             programming on the AS400 /                                         
                                                       
             iSeries                                                            
                                                       
                                                                                
                                                       
                                                                                
                                                       




I find this argument a little out of kilter.  Many of the issues you are
bringing up are not language-specific, especially in a multi-lingual
environment like ILE.  They are OS issues, and handled quite nicely in
ILE (better than most other OS's, in fact).

Exceptions can be signaled to any point in the stack (unlike the "bubble
up one" of most exception-oriented languages).  This is EXTREMELY
powerful.

You can easily hook the job end exit point and provide whatever
finalization your job needs.  While it's not handed to you on a silver
platter, it's much nicer than, say, Java, where canceling the JVM aborts
any finalization.  With ILE, I can do an ENDJOB *IMMED, and my
end-of-job routine STILL gets invoked.

Destructors are only required for garbage-collected languages, and while
garbage collection is a nice-to-have especially for OO languages, it's
certainly not necessary.  We got along just fine without them in C, and
wrote some pretty bullet-proof code.  It's a matter of registering
cleanup code to be execute when the application ends, either normally or
abnormally.  Of course, with ILE much of the system-level cleanup
(locks, ODPs, overrides) can be taken care of for you when you end the
activation group, which is what was intended.

There are many ways to skin a cat, and ILE RPG provides everything you
need.  Just not necessarily the way you're used to.

Joe


> From: Steve Richter
>
> what I dont see mentioned in these posts is that RPG does not have
> features that are critical to writing bullet proof modular code.  That
> is, it does not have destructors, integrated exception handling,
> struct member functions and base classes.
>
> A module has to be able to throw an exception when the inputs are not
> what the module expects.   And since a module is going to call other
> modules which may throw exceptions, a module has to be able to define
> destructor code which will run in the event of an unhandled exception.
> That is, code which will shut the module down in an orderly fashion (
> close files, release mutex locks, free heap allocations ).
>
> -Steve

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



Les informations contenues dans ce message sont confidentielles et peuvent 
constituer des informations privilegiees. Si vous n etes pas le destinataire de 
ce message, il vous est interdit de le copier, de le faire suivre, de le 
divulguer ou d en utiliser tout ou partie. Si vous avez recu ce message par 
erreur, merci de le supprimer de votre systeme, ainsi que toutes ses copies, et 
d en avertir immediatement l expediteur par message de retour.
Il est impossible de garantir que les communications par messagerie 
electronique arrivent en temps utile, sont securisees ou denuees de toute 
erreur ou virus. En consequence, l expediteur n accepte aucune responsabilite 
du fait des erreurs ou omissions qui pourraient en resulter.
--- ----------------------------------------------------- ---
The information contained in this e-mail is confidential. It may also be 
legally privileged. If you are not the addressee you may not copy, forward, 
disclose or use any part of it. If you have received this message in error, 
please delete it and all copies from your system and notify the sender 
immediately by return e-mail.
E-mail communications cannot be guaranteed to be timely secure, error or 
virus-free. The sender does not accept liability for any errors or omissions 
which arise as a result.
$!2$!



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.