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



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Hans
Sent: Monday, May 05, 2003 4:53 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: OOing RPG was RE: open source rpg compiler


Steve Richter wrote:
> You cant be serious! For the programmer, there doesnt have to be anything
> kludgy about C++.

Hans:
>Hmmm, off the top of my head there's the fact that some variables can be
>objects and others not, which causes trouble if for example you want to put
>an int into a collection class. There's the famous lack of a garbage
>collector. Be sure to code "#undef private" at the beginning of your .hpp
>files lest someone "#define private public". Then there's the gotcha of
>returning a reference to an object allocated on the stack from a function.
>Shall I go on?

Sure! You know a lot and dont share my point of view.

I'll admit I am still stumped after more than enough experience by the const
aspects of the STL, but C++ is a language that moves with the programmer as
they improve their progamming and system design techniques. IOW, as you
learn to design and code better, C++ is right there with a technique to
implement it with.

The garbage collection you mention has never been a problem for me.  As long
as I code the destructor of my classes correctly, then all resources are
properly released.

Memory is not the only thing that can become garbage in a running program.
There are also resource handles that have to be properly closed. Does Java
garbage collection auto shutdown sockets, close files and release mutexs ?


>> A big first step toward OOing RPG is to allow a proc to be a member of a
>> data structure.
>>
>> d Pr_Employee   ds                qualified
>> d  Name                      30a  varying
>> d  Number                     7a
>>
>> d Display       pr                MemberProcOfDataStuct( Pr_Employee )
>>
>> d Employee      ds                likeds(Pr_Employee)
>>
>>  /free
>>       Employee.Name    = 'Betty' ;
>>       Employee.Number  = 'a1234' ;
>>       Employee.Display( ) ;
>>
>>       return ;
>> ** -------------------- Pr_Employee.Display -----------------------
>> p Display       b
>> d Display       pi                MemberProcOfDataStuct( Pr_Employee )
>>  /free
>>       fDisplay( Name + ' ' + Number ) ;
>>  /end-free
>> p               e
>>
>> And ILE does not have a fit over this because the RPG compiler would
>> simply insert a C++ like "this" parm as parm1 of the actual
>> Pr_Employee_Display proc.

>And you demonstrate my point nicely. How is this not kludgy? And there's a
>lot more territory to cover before you can call a language object-oriented.

Kludgy for who?  The programmer who codes the data structure object
procedures or the programmer who uses the object?
    Employee       ds          likeds( pr_employee )
    ....
    Employee.Display( ) ;   // kludgy?

how is this coded in the non kludgy way you have in mind?

thanks,

Steve



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.