Value Types for Java
Ben Hutchison
benh at ibsglobalweb.com
Wed Jun 25 00:48:22 PDT 2008
Miles Sabin wrote:
> On Wed, Jun 18, 2008 at 9:28 AM, Ben Hutchison <benh at ibsglobalweb.com> wrote:
>
>> The example case I have in mind is an interaction between a Java
>> process and a 3D graphics driver. Eg a Java process would be
>> writing/updating triangle data in the buffer, and the graphics driver
>> rendering it. (I admit it might be difficult to get this to work even
>> with value type support, given that Java's philosophy says precise
>> memory level representation is undefined by spec)
>>
>
> Right. This strikes me as almost completely orthogonal to the value
> type issue. What you really want is safe and efficient access to raw
> memory and devices. I think it would make a lot of sense to think
> about that independently.
>
It doesn't seem orthogonal to me. I'm unsure precisely what you would
consider "safe and efficient", but the existing ByteBuffer provides a
non-relocatable memory block that you can access efficiently, if you are
happy to treat it as int[] or byte[].
I hope that value types might enable a memory block to be viewed in a
more object-oriented fashion, as an array of value-type /objects/; eg
(going back to my earlier example) as Triangle[].Complete with named
fields, nested structure, and methods.
Note also, I see value types as being predominantly useful intra-JVM.
They are not simply a method for IO with external processes, yet that is
an area where they might add convenience.
(Apologies for delayed reply - have been away from work for several days)
Regards
Ben
--
*Ben Hutchison
Senior Developer
* Level 2 476 St Kilda Road Melbourne VIC 3004
T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 |
www.ibsglobalweb.com <http://www.ibsglobalweb.com/>
This e-mail (and any attachments to this e-mail) is for the exclusive
use of the person, firm or corporation to which it is addressed and may
contain information that by law is privileged, confidential or protected
by copyright. If you are not the intended recipient or the person
responsible for delivering this e-mail to the intended recipient, you
are notified that any use, disclosure, distribution, printing or copying
of this e-mail transmission is prohibited by law and that the contents
must be kept strictly confidential. If you have received this e-mail in
error, kindly notify us immediately on + 613 8807 0168 or respond to the
sender by return e-mail. The original transmission of this e-mail must
be destroyed.
Internet Business Systems Australia Pty Ltd accepts no responsibility
for any viruses this e-mail may contain. This notice should not be removed.
More information about the mlvm-dev
mailing list