Re: How to tie
Abble wrote:
On Dec 31, 9:53 am, Lew <l...@lewscanon.com> wrote:
Abble wrote:
Thanks, Lew, but I'd like if possible to not have to wrap my array.
Why not?
Because I have about 60,000 lines of old code from C, C++, and FORTRAN
with array references like:
D[i] = A[ i ] + B[i] + C[ i ]; // use A B c
I think to objectize these the lines would look like:
D.setval( i, A.getval( i ) + B.getval( i ) + C.getval( i ) ); // use
A B c
So the goal is to do whatever it takes so we can keep the natural
array notations and legibility of the expressions( which can get very
long), AND speed would be nice, as the native code C, C++ and FORTRAN
codes are already not as fast as one might like.
Odd use of "natural," that ...
If the goal is to interpose your own code on array accesses
in Java, I think you're out of luck: Array accesses use built-in
opcodes of the Java Virtual Machine, and there's no provision for
you to insert your own code into the JVM. (Hard to see how the
security and integrity models could permit such a thing, anyhow.)
Perhaps it's time to take a step back: What kind of code do
you want to interpose, and for what purpose? Perhaps the cat
can be skinned some other way.
--
Eric Sosman
esosman@ieee-dot-org.invalid