JLS 3/e -- Lots Of Errors

  • Thread starter Lawrence D'Oliveiro
  • Start date
J

Joshua Cranmer

* Section 3.1, Page 14:

For characters in the range U+0000 to U+FFFF, the values of [Unicode]
code points and UTF-16 code units are the same.

No they are not. U+D800 .. U+DFFF are not valid Unicode code points.

"Surrogates are code points from two special ranges of Unicode values"
[Quoted from <http://www.unicode.org/faq//utf_bom.html#utf16-2>, i.e.,
Unicode itself]

U+D800 to U+DFFF are indeed valid Unicode code points, according to
Unicode itself. It just happens that they have no meaning except as a
pair of values to represent non-BMP characters.
 
J

javax.swing.JSnarker

If your goal is rather to troll, and refuse to accept anything that
folks are telling you, I'm sorry to say you aren't being very notable.
Trolls here set a much higher standard. You'll have to step it up. Start
attacking us personally! Shift the ground of your discourse more. You're
already on the way with erroneous statements of fact ("Virtual methods
started with C++") and simple restatement of claims already refuted in
the discussion. But that's kid stuff. Bring it, dude!

Are you crazy? Do you really want another Twisted on your hands? The
traffic numbers in this group still haven't recovered from the last one!

--
 
J

Jerry Gerrone

If your goal is rather to troll, and refuse to accept anything that
folks are telling you, I'm sorry to say you aren't being very notable.
Trolls here set a much higher standard. You'll have to step it up. Start
attacking us personally! Shift the ground of your discourse more. You're
already on the way with erroneous statements of fact ("Virtual methods
started with C++") and simple restatement of claims already refuted in
the discussion. But that's kid stuff. Bring it, dude!

Are you crazy? [implied insult deleted]

No. None of the nasty things that you have said or implied about me
are at all true.
The traffic numbers in this group [implied false accusation deleted]

No. None of the nasty things that you have said or implied about me
are at all true.
 
L

Lawrence D'Oliveiro

Section 4.10.2, page 63:

That is, for each bound type Si in Bi, Ti is a subtype of Si[F1 := T1,
..., Fn := Tn].

Shouldn’t be using the same suffix i on both S and B. Otherwise you might as
well just use B directly instead of S.
 
L

Lawrence D'Oliveiro

Nor is such a mention required, therefore its omission is not an error.
However, it's pretty clear that if 'isNan()' is true, then 'doubleValue()'
must return 'Double.NaN'.

No it is not. The spec carefully refrains from mentioning what floatValue()
and doubleValue() return.
So far not one of the things you've cited as an error has actually been an
error in the JLS. There've been some things difficult to understand, and
you've made some errors, but none have actually come from the JLS.

A word of advice: it is better to shut your mouth and be thought a fool,
than to open it and remove all doubt.
 
L

Lawrence D'Oliveiro

* Section 4.11, page 65:

void <S> loop(S s){ this.<S>loop(s);}

Does this even make sense?
 
L

Lawrence D'Oliveiro

* Section 8.4.1, page 211:

LastFormalParameter:
VariableModifiers Type...opt VariableDeclaratorId
FormalParameter

The “...†should not have “opt†after it, otherwise it looks just like a
FormalParameter.
 
A

Arved Sandstrom

In that case, why is one called an “upper bound†and the other a “lower
bound�

Because the first (? extends T) specifies an upper bound (namely T), and
the second (? super T) specifies a lower bound (in this case also T).
Actually reading the JLS, or the Java Tutorial on wildcards in generics,
or a good tutorial like
http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html, would
tell you this.

Let me put it another way - you'd never have asked your question if you
had known what "? super" and "? extends" mean.

AHS
 
A

Arved Sandstrom

Section 4.10.2, page 63:

That is, for each bound type Si in Bi, Ti is a subtype of Si[F1 := T1,
..., Fn := Tn].

Shouldn’t be using the same suffix i on both S and B. Otherwise you might as
well just use B directly instead of S.
Don't ever take up tensor calculus, dude.

AHS
 
L

Lawrence D'Oliveiro

Section 4.10.2, page 63:

That is, for each bound type Si in Bi, Ti is a subtype of Si[F1 :=
T1, ..., Fn := Tn].

Shouldn’t be using the same suffix i on both S and B. Otherwise you might
as well just use B directly instead of S.
Don't ever take up tensor calculus, dude.

I’ve done summation conventions in undergrad physics. I know what they mean,
that when you use the same subscript letter twice it’s supposed to stand for
the same value. If you want different values, use different letters.
Simples.
 
L

Lawrence D'Oliveiro

Because the first (? extends T) specifies an upper bound (namely T), and
the second (? super T) specifies a lower bound (in this case also T).

So do you understand what the “<=†symbol is supposed to represent?
 
J

Joshua Cranmer

No it is not. The spec carefully refrains from mentioning what floatValue()
and doubleValue() return.

Why should it mention it? That is what the documentation on the
respective classes in the Java Standard API is for.
 
L

Lawrence D'Oliveiro

A type *name* is not a *type*.

Which directly contradicts the very sentence from the language spec that I
quoted above.

Why all this denial and hatred? Why can’t you simply admit that the language
spec has errors in it? Why the ad-hominem attacks? Anyone would think Java
was your mother.
 
J

Joshua Cranmer

* Section 4.11, page 65:

void<S> loop(S s){ this.<S>loop(s);}

Does this even make sense?

It's a method with a generic parameter that executes an infinite loop
using recursion. What doesn't make sense about it?

The example is showing various usages of types.
 
A

Arved Sandstrom

So do you understand what the “<=†symbol is supposed to represent?
It represents precisely and exactly what this sentence:

"A type argument TA1 is said to contain another type argument TA2,
written TA2 <= TA1, if the set of types denoted by TA2 is provably a
subset of the set of types denoted by TA1"

said. That right there defines '<='. If you're having difficulty
understanding the definition - fair enough - I provided you with some
references that do help.

AHS
 
A

Arved Sandstrom

Which directly contradicts the very sentence from the language spec that I
quoted above.

Why all this denial and hatred? Why can’t you simply admit that the language
spec has errors in it? Why the ad-hominem attacks? Anyone would think Java
was your mother.

I can't speak for anyone else. I don't deny that the various versions of
the JLS have had and still have errors, just like any other dense
document does. But you're not locating any of them.

AHS
 
A

Arved Sandstrom

Section 4.10.2, page 63:

That is, for each bound type Si in Bi, Ti is a subtype of Si[F1 :=
T1, ..., Fn := Tn].

Shouldn’t be using the same suffix i on both S and B. Otherwise you might
as well just use B directly instead of S.
Don't ever take up tensor calculus, dude.

I’ve done summation conventions in undergrad physics. I know what they mean,
that when you use the same subscript letter twice it’s supposed to stand for
the same value. If you want different values, use different letters.
Simples.

Well, obviously not that "simples", seeing as how that's not what the
summation convention is.

My point was that if they, in this example, are going to use subscripts
at all, in that particular spot it had best be 'i' both times. And since
the wording was "for _each_" the use of subscripts wasn't all that
inappropriate. It certainly didn't rate your quibble.

AHS
 
L

Lawrence D'Oliveiro

Section 4.10.2, page 63:

That is, for each bound type Si in Bi, Ti is a subtype of Si[F1
:= T1, ..., Fn := Tn].

Shouldn’t be using the same suffix i on both S and B. Otherwise you
might as well just use B directly instead of S.

My point was that if they, in this example, are going to use subscripts
at all, in that particular spot it had best be 'i' both times.

If you use the same letter, it stands for the same value. If you want
different values, use different letters. That’s all there is to it.
And since the wording was "for _each_" the use of subscripts wasn't all
that inappropriate. It certainly didn't rate your quibble.

There can only be one Si in Bi.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top