Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25518 > unrolled thread
| Started by | Lew <noone@lewscanon.com> |
|---|---|
| First post | 2011-02-05 09:43 -0500 |
| Last post | 2011-02-07 14:32 +1300 |
| Articles | 8 — 4 participants |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: JLS 3/e -- Lots Of Errors Lew <noone@lewscanon.com> - 2011-02-05 09:43 -0500
Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 15:48 +1300
Re: JLS 3/e -- Lots Of Errors Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 22:00 -0500
Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 19:12 +1300
Re: JLS 3/e -- Lots Of Errors Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 20:49 -0500
Re: JLS 3/e -- Lots Of Errors Arne Vajhøj <arne@vajhoej.dk> - 2011-02-06 21:00 -0500
Re: JLS 3/e -- Lots Of Errors Arne Vajhøj <arne@vajhoej.dk> - 2011-02-06 21:02 -0500
Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 14:32 +1300
| From | Lew <noone@lewscanon.com> |
|---|---|
| Date | 2011-02-05 09:43 -0500 |
| Subject | Re: JLS 3/e -- Lots Of Errors |
| Message-ID | <iijnm4$d5j$1@news.albasani.net> |
On 02/05/2011 07:32 AM, Lawrence D'Oliveiro wrote: > * Section 5.1.8, page 88: no mention of what happens when you unbox a NaN > (the previous page said only that the boxed object had isNaN() evaluating to > true, no mention of what floatValue() or doubleValue() might return). 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'. That's an API issue and not strictly something to find in the JLS. 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. -- Lew Ceci n'est pas une fenêtre. .___________. |###] | [###| |##/ | *\##| |#/ * | \#| |#----|----#| || | * || |o * | o| |_____|_____| |===========|
[toc] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Date | 2011-02-07 15:48 +1300 |
| Message-ID | <iinmhi$9er$3@lust.ihug.co.nz> |
| In reply to | #25518 |
In message <iinj40$a1r$1@news.eternal-september.org>, Joshua Cranmer wrote: > On 02/06/2011 08:32 PM, Lawrence D'Oliveiro wrote: > >> If that’s the case, there should be a reference to where it’s >> properly defined. > > Did you read the introductory matter? That seems non-normative. In order to be normative, it needs to spell things out in detail. >> As noted above, this specification often refers to classes of the >> Java and Java 2 platforms. In particular, some classes have a special >> relationship with the Java programming language. Examples include >> classes such as Object, Class, ClassLoader, String, Thread, and the >> classes and interfaces in package java.lang.reflect, among others. >> The language definition constrains the behavior of these classes and >> interfaces, but this document does not provide a complete >> specification for them. The reader is referred to other parts of the >> Java platform specification for such detailed API specifications. > > That reads to me as saying "We don't try to define the interface of > classes here, go read the Java API documentation." You’ll notice that Float and Double are not mentioned in that list.
[toc] | [prev] | [next] | [standalone]
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Date | 2011-02-06 22:00 -0500 |
| Message-ID | <iinn8c$7vs$1@news.eternal-september.org> |
| In reply to | #25563 |
On 02/06/2011 09:48 PM, Lawrence D'Oliveiro wrote: > In message<iinj40$a1r$1@news.eternal-september.org>, Joshua Cranmer wrote: > >> On 02/06/2011 08:32 PM, Lawrence D'Oliveiro wrote: >> >>> If that’s the case, there should be a reference to where it’s >>> properly defined. >> >> Did you read the introductory matter? > > That seems non-normative. In order to be normative, it needs to spell things > out in detail. It does not say that it is non-normative, so it is normative. >> That reads to me as saying "We don't try to define the interface of >> classes here, go read the Java API documentation." > > You’ll notice that Float and Double are not mentioned in that list. What part of "Examples include" do you not understand? -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Date | 2011-02-07 19:12 +1300 |
| Message-ID | <iio2fi$g2f$5@lust.ihug.co.nz> |
| In reply to | #25599 |
In message <iinn8c$7vs$1@news.eternal-september.org>, Joshua Cranmer wrote: > On 02/06/2011 09:48 PM, Lawrence D'Oliveiro wrote: > >> In message<iinj40$a1r$1@news.eternal-september.org>, Joshua Cranmer >> wrote: >> >>> On 02/06/2011 08:32 PM, Lawrence D'Oliveiro wrote: >>> >>>> If that’s the case, there should be a reference to where it’s >>>> properly defined. >>> >>> Did you read the introductory matter? >> >> That seems non-normative. In order to be normative, it needs to spell >> things out in detail. > > It does not say that it is non-normative, so it is normative. > >>> That reads to me as saying "We don't try to define the interface of >>> classes here, go read the Java API documentation." >> >> You’ll notice that Float and Double are not mentioned in that list. > > What part of "Examples include" do you not understand? The part it doesn’t explain.
[toc] | [prev] | [next] | [standalone]
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Date | 2011-02-06 20:49 -0500 |
| Message-ID | <iinj40$a1r$1@news.eternal-september.org> |
| In reply to | #25518 |
On 02/06/2011 08:32 PM, Lawrence D'Oliveiro wrote: > If that’s the case, there should be a reference to where it’s > properly defined. Did you read the introductory matter? > As noted above, this specification often refers to classes of the > Java and Java 2 platforms. In particular, some classes have a special > relationship with the Java programming language. Examples include > classes such as Object, Class, ClassLoader, String, Thread, and the > classes and interfaces in package java.lang.reflect, among others. > The language definition constrains the behavior of these classes and > interfaces, but this document does not provide a complete > specification for them. The reader is referred to other parts of the > Java platform specification for such detailed API specifications. That reads to me as saying "We don't try to define the interface of classes here, go read the Java API documentation." -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-02-06 21:00 -0500 |
| Message-ID | <4d4f5247$0$23761$14726298@news.sunsite.dk> |
| In reply to | #25518 |
On 05-02-2011 22:46, Joshua Cranmer wrote: > On 02/05/2011 09:48 PM, Lawrence D'Oliveiro wrote: >> In message<iijnm4$d5j$1@news.albasani.net>, Lew wrote: >>> On 02/05/2011 07:32 AM, Lawrence D'Oliveiro wrote: >>>> * Section 5.1.8, page 88: no mention of what happens when you unbox >>>> a NaN >>>> (the previous page said only that the boxed object had isNaN() >>>> evaluating >>>> to true, no mention of what floatValue() or doubleValue() might >>>> return). >>> >>> 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. > > Why should it mention it? That is what the documentation on the > respective classes in the Java Standard API is for. In fact it would be pretty bad to duplicate the information from a maintenance perspective. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2011-02-06 21:02 -0500 |
| Message-ID | <4d4f52c6$0$23761$14726298@news.sunsite.dk> |
| In reply to | #25518 |
On 05-02-2011 21:48, Lawrence D'Oliveiro wrote: > In message<iijnm4$d5j$1@news.albasani.net>, Lew wrote: >> 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. Wise words. May I suggest that you take that advice. Arne
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Date | 2011-02-07 14:32 +1300 |
| Message-ID | <iini4a$75r$3@lust.ihug.co.nz> |
| In reply to | #25518 |
In message <iil5i6$10m$2@news.eternal-september.org>, Joshua Cranmer wrote: > On 02/05/2011 09:48 PM, Lawrence D'Oliveiro wrote: > >> In message<iijnm4$d5j$1@news.albasani.net>, Lew wrote: >> >>> On 02/05/2011 07:32 AM, Lawrence D'Oliveiro wrote: >>> >>>> * Section 5.1.8, page 88: no mention of what happens when you unbox a >>>> NaN (the previous page said only that the boxed object had isNaN() >>>> evaluating to true, no mention of what floatValue() or doubleValue() >>>> might return). >>> >>> 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. > > Why should it mention it? That is what the documentation on the > respective classes in the Java Standard API is for. If that’s the case, there should be a reference to where it’s properly defined.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web