Article View: news.software.readers
Article #120377Re: 64 bit addressing and OOP
From: Kent Paul Dolan
Date: Wed, 19 Feb 2003 01:04
Date: Wed, 19 Feb 2003 01:04
90 lines
5252 bytes
5252 bytes
Tim Tyler <tim@tt1.org> wrote:
> In comp.lang.java.advocacy
[Probably you ought not to do that that way, Tim; in a cross
posted article, all you really know is where _you_ are
reading it, and "from where" _you_ are answering it, you
ought not to claim to know "from where" I was posting it;
something like "Answering in c.l.j.a what KPD wrote ...
la-la-la" would more closely approximate the truth, and
probably be closer to what you wanted, too, a disclaimer of
knowing the context in the other groups, though it would be
flat out wonderful if the news posting _software_ would
annotate where the OP was reading when the article was
posted, so you could trim down to there and be sure s/he
was in reality a reader of that group, rather than being
stuck wallpapering the whole original list to assure a hit.]
> Kent Paul Dolan <xanthian@well.com> wrote:
>> I've no real clue whether arrays can be indexed with longs
>> instead, and arrays that size "just work", but I'd be
>> amazed to find that to be true, because nothing I've run
>> into so far in the declaration of arrays seems to include
>> an "indexed by what type" portion [...]
> I think it /might/ have worked without that.
> However in fact it doesn't. Arrays can only have integer
> indices.
> int[] ia = new int[10];
> long l = 0x100000001L;
> Log.log("result:" + ia[l]);
> ...gives compiler error - wanting the index cast to an int.
> ``A component of an array is accessed using an array access
> expression. Arrays may be indexed by int values; short,
> byte, or char values may also be used as they are subjected
> to unary numeric promotion (�2.6.10) and become int values.
> - http://sunsite.ccu.edu.tw/java/vmspec/Concepts.doc.html
> No provision for longs.
> That means a 2Gb maximum, I believe - since ints are signed.
Ah, but the stronger argument is a 2 gibibyte maximum
_what_? Two Gb of doubles is ambiguous; is that two odd
billion array _entries_, or two odd billion _bytes_ of data
in a contiguous chunk that happen to be doubles, an eighth
as many entries? The integer address can surely _name_ the
former, but in a 32 bit _architecture_, can the JVM really
peek and poke them?
Since we are stuck with 32 (31 really as you note) bit
addressing busses, most likely the limitation is in bytes,
but if your statement that the JVM is buss neutral holds any
_functional_ reality, not merely representing a
_permission_, one ought to be able to get that many
_entries_, and let the JVM figure out where to put them and
how to find them.
The problem with sticking with a 32 bit architecture is that
thenceforth, _everything_ you do to extend it is a kludge,
and very likely every place the problem is solved with a
_different_ kludge because solved by a different specialist
(community), creating unbearable maintenance nightmares;
while shifting to the addressing width of your data needs
makes everything clean, granted that clean is also bulky and
slow and sucks power like a three-days-out camel trying to
inhale an oasis.
Since we have let ourselves be led down that kludge-garden
path several times already, with all the attendant suffering
and grief, how about we just take a "pass" this time, grip
the chance to _learn_ from our very own history, and do the
job correctly from the start?
xanthian.
[The concept of a fairly-newly-blessed CS PhD throwing
wooden shoes into the loom gears _does_ tug at the heart,
Tim, but I just think you have a fixation that needs
unblocking (and I'd be checking those shoes suspiciously for
fractal dimension anyway with my Mandelbrot micrometer).]
[Or, "Mandelbrometer" might be more felicitious, if he'll
forgive eliding the silent "t" at the end of his name.]
Technical Details
Message-ID:
<a3eaa964.0302181704.4ae87daa@posting.google.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.java.advocacy.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<mvul4v00ftbai2g6duuh0r38jpii2qvpjl@4ax.com> <PuF2a.34145$rq4.2589125@bgtnsc05-news.ops.worldnet.att.net> <HA8sq6.6AL@bath.ac.uk> <a3eaa964.0302132057.7568b83d@posting.google.com> <K1G3a.90064$F63.1896233@news.xtra.co.nz> <a3eaa964.0302160804.190f6d38@posting.google.com> <HAEyJ0.9zH@bath.ac.uk> <a3eaa964.0302161813.64d96f34@posting.google.com> <maslen.1045454195@dstc.edu.au> <a3eaa964.0302171715.20e70250@posting.google.com> <HAI0DH.C5s@bath.ac.uk>Show Full Headers
Complete Article Headers
Message-ID: <a3eaa964.0302181704.4ae87daa@posting.google.com> Subject: Re: 64 bit addressing and OOP Date: Wed, 19 Feb 2003 01:04:14 +0000 From: xanthian@well.com (Kent Paul Dolan) References: <mvul4v00ftbai2g6duuh0r38jpii2qvpjl@4ax.com> <PuF2a.34145$rq4.2589125@bgtnsc05-news.ops.worldnet.att.net> <HA8sq6.6AL@bath.ac.uk> <a3eaa964.0302132057.7568b83d@posting.google.com> <K1G3a.90064$F63.1896233@news.xtra.co.nz> <a3eaa964.0302160804.190f6d38@posting.google.com> <HAEyJ0.9zH@bath.ac.uk> <a3eaa964.0302161813.64d96f34@posting.google.com> <maslen.1045454195@dstc.edu.au> <a3eaa964.0302171715.20e70250@posting.google.com> <HAI0DH.C5s@bath.ac.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.java.advocacy.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mail Newsgroups: comp.lang.java.advocacy,comp.object,misc.misc,talk.bizarre,news.software.readers Organization: http://groups.google.com/ Lines: 89 NNTP-Posting-Host: 129.8.249.134 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1045616654 14188 127.0.0.1 (19 Feb 2003 01:04:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Feb 2003 01:04:14 GMT