Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #27935

Re: how actually string store in java machine

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: how actually string store in java machine
Date Wed, 02 Apr 2014 10:15:22 -0400
Organization A noiseless patient Spider
Lines 34
Message-ID <lhh61t$i1c$1@dont-email.me> (permalink)
References <8f7d9272-4b25-44c9-8c31-93ea754be4cb@googlegroups.com> <lgsflf$pua$1@dont-email.me> <lgslfc$k81$1@news.albasani.net> <lgslj6$k81$2@news.albasani.net> <b9f4j99knq24nqdmi1ultckkm82ecem7v6@4ax.com> <lguruv$1dm$1@dont-email.me> <lgv48i$528$1@dont-email.me> <lgvoc6$b1n$1@dont-email.me> <lh172f$mkp$1@dont-email.me> <65fa691c-6471-44b2-a0c9-a1053bdcbf1d@googlegroups.com> <lh1hc0$789$1@dont-email.me> <955bd254-d2e1-47a4-b6df-f7b92215a745@googlegroups.com> <lh42up$5jq$1@dont-email.me> <c6c30ad7-7aab-4d2b-be44-f60d4826c376@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Wed, 2 Apr 2014 14:15:25 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="18476"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Fz63tg68h50L4R72tnFIg"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
In-Reply-To <c6c30ad7-7aab-4d2b-be44-f60d4826c376@googlegroups.com>
Cancel-Lock sha1:GbQamXsIOyHGeIhMSzT0Ko9OklU=
Xref csiph.com comp.lang.java.programmer:27935

Show key headers only | View raw


On 4/2/2014 8:47 AM, taqmcg@gmail.com wrote:
> On Friday, March 28, 2014 11:02:45 AM UTC-4, Eric Sosman wrote:
>> On 3/28/2014 9:58 AM, taqmcg@...
>>> On Thursday, March 27, 2014 11:50:22 AM UTC-4, Eric Sosman wrote:
>
>>       As I said, Java behaves more consistently across platforms than
>> other languages in my experience.  "Write Once, Run Anywhere" was a
>> goal of the language, but like "Don't Be Evil" it's not a goal that
>> was attained in perfection.  A few examples of variability:
>>
> ... examples delete ...
> Thanks Eric.  The first is pretty close to the situation with strings.  But it's interesting to note that these are all (I think) in the implementation of methods so that the documentation of these system dependencies is not in the language standard itself, but in the Javadocs for the standard library.  No methods are involved in the == comparison of strings, so if it were to be system dependent, then presumably that would have to be noted in the JLS itself.  Are there examples where the system dependencies are explicitly called out in the JLS, i.e., similar to allowing non-strict math results?

     I dunno.  In Original Java the == operator behaved the same way for
all reference types (it asked "Do these two references denote the same
instance?"), so the results of using == on two Integer references, for
example, could differ depending on how many values the particular JVM
chose to cache.  But then they changed the meaning of == for the
primitive wrappers, so that difference went away (and that's why I
mentioned using System.identityHashCode() in the comparison).

     It strikes me, though, that you seem to argue Java's platform
independence by progressively whittling away the dependencies that
arise. You began with "We'll just ignore strictfp" and "Oh, let's not
worry about anything involving the host environment," and now it seems
"Methods don't count, either."  With an approach like this, I might
well argue that all birds are crows: We'll just agree not to consider
peacocks, and emus don't fly so they scarcely count, and finches aren't
big enough to worry with, and ... eventually I'll have proved universal
crowhood!  ;-)

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how actually string store in java machine Rishipal Singh <95rishipal@gmail.com> - 2014-03-25 09:56 -0700
  Re: how actually string store in java machine Roedy Green <see_website@mindprod.com.invalid> - 2014-03-25 10:32 -0700
  Re: how actually string store in java machine Roedy Green <see_website@mindprod.com.invalid> - 2014-03-25 10:33 -0700
  Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-25 13:49 -0400
    Re: how actually string store in java machine Jan Burse <janburse@fastmail.fm> - 2014-03-25 20:29 +0100
      Re: how actually string store in java machine Jan Burse <janburse@fastmail.fm> - 2014-03-25 20:31 +0100
        Re: how actually string store in java machine Roedy Green <see_website@mindprod.com.invalid> - 2014-03-25 19:37 -0700
          Re: how actually string store in java machine Jan Burse <janburse@fastmail.fm> - 2014-03-26 09:03 +0100
            Re: how actually string store in java machine Jan Burse <janburse@fastmail.fm> - 2014-03-26 09:11 +0100
            Re: how actually string store in java machine Jan Burse <janburse@fastmail.fm> - 2014-03-27 10:27 +0100
          Re: how actually string store in java machine markspace <markspace@nospam.nospam> - 2014-03-26 08:32 -0700
            Re: how actually string store in java machine Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-03-26 13:54 -0400
              Re: how actually string store in java machine taqmcg@gmail.com - 2014-03-26 12:57 -0700
              Re: how actually string store in java machine markspace <markspace@nospam.nospam> - 2014-03-26 16:37 -0700
                Re: how actually string store in java machine Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-03-27 08:54 -0400
                Re: how actually string store in java machine taqmcg@gmail.com - 2014-03-27 08:23 -0700
                Re: how actually string store in java machine Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-03-27 11:50 -0400
                Re: how actually string store in java machine taqmcg@gmail.com - 2014-03-28 06:58 -0700
                Re: how actually string store in java machine Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-03-28 11:02 -0400
                Re: how actually string store in java machine taqmcg@gmail.com - 2014-04-02 05:47 -0700
                Re: how actually string store in java machine Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-04-02 10:15 -0400
                Re: how actually string store in java machine taqmcg@gmail.com - 2014-04-03 08:58 -0700
            Re: how actually string store in java machine Roedy Green <see_website@mindprod.com.invalid> - 2014-03-26 17:07 -0700
      Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-25 16:07 -0400
        Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-25 16:16 -0400
          Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-25 16:19 -0400
            Re: how actually string store in java machine markspace <markspace@nospam.nospam> - 2014-03-25 14:00 -0700
              Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-25 17:21 -0400
                Re: how actually string store in java machine Jeff Higgins <jeff@invalid.invalid> - 2014-03-26 11:40 -0400
                Re: how actually string store in java machine Roedy Green <see_website@mindprod.com.invalid> - 2014-03-26 17:46 -0700
  Re: how actually string store in java machine Lew <lewbloch@gmail.com> - 2014-03-25 15:07 -0700

csiph-web