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



Jerry,

Namespaces are especially important in naming procedures... just imagine
that you have customers and employees for which you have written a
procedure to get their name... in that case you would end up with twice
the procedure getName(). This means that you need to rename them to for
example customergetName and employeegetName, but whenever the service
program is not developed inhouse, you might not have the source.

In case you would have namespaces, it would become customer.getName and
employee.getName... but again, it really only makes sence to me if you
can instantiate objects (and have methods). For example

cus1 = new Customer(1);
name = cus1.getName();
emp1 = new Employee(1);
name2 = emp1.getName();

... and since you have object instances...

emp2 = new Employee(2);
If emp1.getName() = emp2.getName();

This is still far from OO, but would life so much easier.

Kind regards,
Paul

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: woensdag 13 januari 2010 15:52
To: RPG programming on the IBM i / System i
Subject: RE: RPGV?

I admit that I had never heard the term "namespaces" prior to this
thread. So I did a search. Most of the references I found dealt with
XML and a few with Java script neither of which (correct me if I err) is
OO.

But that's not my point. If I interpreted the sources correctly (again,
corrections welcome), qualified data structures are a namespace. Beyond
that what is meant by namespaces in RPG? I.e., are we talking about
qualifying the field names by file/table name, such as FILEA:FIELDA,
FILEB:FIELDA, with a "Qualified" keyword on the F-spec? Or something
else/more? Why is this such a hot button?

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


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.