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


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

Re: Java 7 vs 8 speed issues on Win7?

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Java 7 vs 8 speed issues on Win7?
Date 2014-11-06 09:50 -0500
Organization A noiseless patient Spider
Message-ID <m3g1qp$m3j$1@dont-email.me> (permalink)
References (4 earlier) <m3ej2t$9ae$1@dont-email.me> <m3emtc$bd2$1@dont-email.me> <m3erpb$qt5$1@dont-email.me> <m3etjs$b9$1@dont-email.me> <m3fvet$ko3$1@news.albasani.net>

Show all headers | View raw


On 11/6/2014 9:09 AM, Jan Burse wrote:
> Hi,
>
> Eric Sosman schrieb:
>>      I, too, wonder what he meant by "changed semantics," since as far
>> as I know the contract of String#substring(int,int) has not changed
>> since Java 1.0, and perhaps earlier.  The underlying implementations
>> have changed, I believe, but that's not what I'd call a "semantic"
>> difference.
>
> I don't think a method signature (=contract) alone
> defines any semantics.[...]

     I guess we'll just have to accept that "semantics" means something
different to you than it does to me.  It seems you consider the quirks
of a particular implementation are part of the "semantics," while I do
not.  Merriam-Webster offers two capsule definitions:

	the study of the meanings of words and phrases in language

	the meanings of words and phrases in a particular context

... plus more detailed definitions using words like "semiotics"
and "signification."  The use of "semantics" in re programming is
clearly something of an abuse or at least a twist of the actual
meaning, so I doubt there's a usable authority to whom we can
appeal to resolve our different understandings of the word.  We'll
just have to accept that we differ -- and that You're Wrong!!!  :)

> That the semantic has changed can also be seen by the
> fields that the String class now features (JDK 8):
>
>      private final char value[];
>      private int hash;

     Note the keyword `private'.  Thought experiment: If `hash'
were declared before `value' instead of after, would that be a
"semantic" change?  What if the fields were renamed to `data'
and `code'; would that be a "semantic" change?

> So the internal contract has massively changed.

     If there's any such thing as an "internal contract," this is
the first I've heard of it.  The entire premise of "write to the
interface, not the implementation" is that such contracts do *not*
exist!  As a practical matter they sometimes sort of do: We expect
an Iterator's implementation of next() to take approximately constant
time, or maybe logarithmic at the worst, although there's nothing
in any contract anywhere that actually makes such a promise.  I'm
not denying that the supposedly-invisible internals sometimes make
themselves apparent and present problems or opportunities; I'm just
resisting the attempt to refer to such things as part of a "contract"
or to call them "semantics."

     Thought experiment: If the next JVM patch improves the JIT so
sparse `switch' blocks on `char' values are compiled more efficiently,
is that a change in the "semantics" of `switch'?

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

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


Thread

Java 7 vs 8 speed issues on Win7? Knute Johnson <eternal@knutejohnson.com> - 2014-10-22 10:18 -0700
  Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-10-24 11:10 +0200
  Re: Java 7 vs 8 speed issues on Win7? Roedy Green <see_website@mindprod.com.invalid> - 2014-11-05 04:36 -0800
    Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 08:23 -0800
      Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-05 20:47 +0100
        Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 17:32 -0800
          Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-05 21:37 -0500
            Re: Java 7 vs 8 speed issues on Win7? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2014-11-05 20:00 -0800
              Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-05 23:32 -0500
                Re: Java 7 vs 8 speed issues on Win7? Robert Klemme <shortcutter@googlemail.com> - 2014-11-06 08:48 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 15:09 +0100
                Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-06 09:50 -0500
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 18:21 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 18:34 +0100
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-06 23:03 +0100
                Re: Java 7 vs 8 speed issues on Win7? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-06 17:21 -0500
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-07 00:07 +0100
                Re: Java 7 vs 8 speed issues on Win7? "Bob(but not" THAĊ˘ "Bob)" <nobody@nowhere.net> - 2014-11-07 08:48 +0000
                Re: Java 7 vs 8 speed issues on Win7? Jan Burse <janburse@fastmail.fm> - 2014-11-08 11:28 +0100
        Re: Java 7 vs 8 speed issues on Win7? Roedy Green <see_website@mindprod.com.invalid> - 2014-11-20 03:12 -0800
          Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-11-20 13:24 +0100
            Re: Java 7 vs 8 speed issues on Win7? Robert Klemme <shortcutter@googlemail.com> - 2014-11-20 19:06 +0100
              Re: Java 7 vs 8 speed issues on Win7? Silvio <silvio@internet.com> - 2014-11-20 22:54 +0100
                Re: Java 7 vs 8 speed issues on Win7? Brixomatic <brixomatic@yahoo.com> - 2014-11-22 08:54 +0100
                Re: Java 7 vs 8 speed issues on Win7? Brixomatic <brixomatic@yahoo.com> - 2014-11-22 09:19 +0100
    Re: Java 7 vs 8 speed issues on Win7? Fredrik Jonson <fredrik@jonson.org> - 2014-11-29 07:44 +0000

csiph-web