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


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

Re: what are java specsification? what are reference implementation?

From Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: what are java specsification? what are reference implementation?
Date 2014-08-19 23:08 -0500
Organization A noiseless patient Spider
Message-ID <lt170t$e9b$1@dont-email.me> (permalink)
References (1 earlier) <rhuau9lornch0jkkoinjpdd5cobi8j6qka@4ax.com> <c4mbgaFefqtU1@mid.individual.net> <2gpju993v7omd24fs221tn5dtp5kjn1pss@4ax.com> <b1317e2c-36b6-494d-b47c-c392ace721e2@googlegroups.com> <53f36a96$0$300$14726298@news.sunsite.dk>

Show all headers | View raw


On 8/19/2014 10:17 AM, Arne VajhĂžj wrote:
> On 8/18/2014 11:08 AM, Robert Klemme wrote:
>> On Tuesday, August 12, 2014 12:04:49 PM UTC+2, Roedy Green wrote:
>>> Java as a spec is much tighter than usual, and has done a better job
>>> than anyone on WORA.
>>
>> No, it's not the spec that did the good job but vendors implementing
>> it.  Luckily for Java there were only few vendors and one of them
>> happened to be the driving force behind the spec as well.
>
> I think you need to give more credit to the spec.
>
> The Java spec has a few strong points:
> * it is a relative simple language and VM
> * the description is relative detailed
> * there is very little undefined and implementation specific behavior

I don't think these help as much as you think. The core C syntax, for 
example, is about equally simple in both syntax and semantics as Java's 
syntax and semantics, even with the plethora of undefined and 
implementation-defined behavior. It even turns out that said behaviors 
are also rather portable: char is in practice signed everywhere and 8 
bits, integers are 2's complement, and even the undefined overflow is 
going to be optimized the same across all major implementations.

The problems with portability in C--or in most languages, for that 
matter--really come down to cases where there is serious disagreement 
among implementations: the size of pointers in C, for example, or path 
names in any language. You can make it portable if you're careful, but 
you can also easily write nonportable code.

Another problematic aspect of portability is that there are different 
expectations about what should be portable. If I ran a tight Java loop 
inside some code measuring the time it took to execute, the fact that 
I'm not going to get consistent values for that time isn't usually 
considered a portability issue. If I ran a tight loop in the assembly 
code of, say, an old Atari console, and that loop took different times 
in hardware versus an emulator, I very much would consider that a major 
bug in the emulator's implementation.

Rather, I think the single biggest factor is that the Java specification 
has only one major implementation, and the specification and that 
implementation can co-evolve. In the face of any question over the 
standard, you can really just point at the Sun (now Oracle) JVM and say 
"do what that does."

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

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


Thread

what are java specsification? what are reference implementation? www <xsli2@yahoo.com> - 2014-08-08 07:46 -0700
  Re: what are java specsification? what are reference implementation? Josip Almasi <joe@vrspace.org> - 2014-08-08 17:28 +0200
    Re: what are java specsification? what are reference implementation? Jeff Higgins <jeff@invalid.invalid> - 2014-08-09 04:24 -0400
      Re: what are java specsification? what are reference implementation? Josip Almasi <joe@vrspace.org> - 2014-08-10 13:26 +0200
  Re: what are java specsification? what are reference implementation? Jeff Higgins <jeff@invalid.invalid> - 2014-08-08 15:55 -0400
  Re: what are java specsification? what are reference implementation? Roedy Green <see_website@mindprod.com.invalid> - 2014-08-08 18:37 -0700
    Re: what are java specsification? what are reference implementation? Robert Klemme <shortcutter@googlemail.com> - 2014-08-09 12:29 +0200
      Re: what are java specsification? what are reference implementation? Roedy Green <see_website@mindprod.com.invalid> - 2014-08-12 03:04 -0700
        Re: what are java specsification? what are reference implementation? Robert Klemme <shortcutter@googlemail.com> - 2014-08-18 08:08 -0700
          Re: what are java specification? what are reference implementation? Roedy Green <see_website@mindprod.com.invalid> - 2014-08-18 23:28 -0700
          Re: what are java specsification? what are reference implementation? Arne VajhĂžj <arne@vajhoej.dk> - 2014-08-19 11:17 -0400
            Re: what are java specsification? what are reference implementation? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-08-19 17:42 +0100
            Re: what are java specsification? what are reference implementation? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-08-19 23:08 -0500
  Re: what are java specsification? what are reference implementation? "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-08-09 11:17 +0100

csiph-web