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





Joe wrote:

But not primitives. In order to pass an updatable integer, I have to
create an Integer, set the value, pass the object to the routine, then
unwrap it in the called routine and use it, set it back into the object,
and then unwrap it in the caller. With autoboxing and inlining you
might argue that it's pretty transparent to the programmer, but it's
something I don't even have to worry about in RPG.

I don't see a problem regarding primitives specifically, as this is
simply solved using another valueholder class which can hold primitives,
eg "ValueHolderInt".

But you're right in the sense that it's more complicated in Java as
opposed to RPG because the latter has built-in semantics for I/O
parameters. This is also true for other aspects, like the built-in
support for decimals in RPG.

It's just one more way Java (and OO in general) gets in my way as a
programmer.

Well, each language has it's deficiencies i suppose. For me, for example,
RPG can get rather in the way whenever i want to define a simple procedure.
The boilerplate code to do this, including the prototype and with the
two /free ... /end-free statements to be able to use free-format within
the procedure, takes 6 whole statements. And this is for a procedure
without any parameters. Add to that two statements (i.e. two whole lines)
for each parameter. It's quite hard to convince my more traditionally
oriented RPG programmers to use procedures instead of subroutines. The
syntax doesn't help.

That's why I really like EGL; it supports bidirectional
parameters as well, even at the primitive level.

Thats nice. I think EGL has a lot more advantages. But i'm sure it also
has some deficiencies. Anyhow, not to start a flame war or something,
there will always be languages that are newer and have better support
for feature x than language y. Being able to define I/O parameters is
one of those. But there are more important things to consider for a
language than built-in features.

For one, each language has a specific ecosystem, culture, available
tools, number of programmers and quality of these programmers. For
example, a smalltalk programmer probably has more experience and
knowledge about OO design than a VB programmer, although VB also
supports OO. But for VB there are lots of components and tools
available, and VB programmers are easy to find. Another example is
an RPG programmer who probably is much more "business oriented" than,
for example, a C programmer. But RPG and C have different markets.

I think the most important feature of a programming language, because
this is what a programming language is meant for, is a clean, simple,
but expressive syntax, based on a clean and simple model, with which
one can make abstractions. In this respect, i think Java is a good
example. The language is clean and simple, and it has a simple, but
powerful model (a pure OO model). But, unlike RPG, it is not integrated
into the OS. And simple things that we as business programmers use
every day, for example decimal calculations, and db access, take more
work than in RPG. But because Java is quite powerful one can mediate
this by abstricting things out, like db access.







Date: Mon, 9 Mar 2009 06:01:14 -0500
From: joepluta@xxxxxxxxxxxxxxxxx
To: java400-l@xxxxxxxxxxxx
Subject: Re: Java and OO Concepts

john e wrote:
Joe wrote:

In fact, I prefer RPG procedures because I can pass multiple
input/output parameters; it's a very nice technique.


You can have multiple I/O parameters in Java easily by using a
"value holder" object, e.g. ValueHolder which has simply one
public property, "value". Simply pass a valueholder for each
I/O parameter and replace "value" with the object to be returned.


But not primitives. In order to pass an updatable integer, I have to
create an Integer, set the value, pass the object to the routine, then
unwrap it in the called routine and use it, set it back into the object,
and then unwrap it in the caller. With autoboxing and inlining you
might argue that it's pretty transparent to the programmer, but it's
something I don't even have to worry about in RPG.

It's just one more way Java (and OO in general) gets in my way as a
programmer. That's why I really like EGL; it supports bidirectional
parameters as well, even at the primitive level.

Joe
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


_________________________________________________________________
Download de nieuwste emoticons voor in je Messenger
http://www.msnmessengerexperience.nl/chuck/

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.