|
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.
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.
As an Amazon Associate we earn from qualifying purchases.
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.