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



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

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?

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

Cheers! Hans


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.