Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34928 > unrolled thread
| Started by | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| First post | 2016-07-16 18:34 -0400 |
| Last post | 2016-07-16 18:34 -0400 |
| Articles | 1 — 1 participant |
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: void Arne Vajhøj <arne@vajhoej.dk> - 2016-07-16 18:34 -0400
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-16 18:34 -0400 |
| Subject | Re: void |
| Message-ID | <nmecpm$1uao$1@gioia.aioe.org> |
On 7/16/2016 6:20 PM, Stefan Ram wrote: > On several occassions I have observed that the compiler, javac, > has it's own vocabulary. For example, it uses words like »context« > or »symbol« that might not be used this way in the JLS. > > Another example I encountered today: > > The JLS does not seem to think of »void« as a »type«. It says: > > 8.4.5 Method Result > > The result of a method declaration either declares the type of > value that the method returns (the return type), or uses the > keyword void to indicate that the method does not return a value. > > (end of quotation). > > But for the compiler, it seems to be a »type«: > > Main.java:3: error: 'void' type not allowed here > java.lang.System.out.println( java.lang.System.out.println() ); }} > ^ > > This can be confusing for teachers and students. Often they > will not be consciously aware of the different systems of concepts > because they often do not study the JLS and the error messages > in such a depth, but they might subconsciously feel irritated > and get the feeling that something is confusing. I will argue a more practical focused perspective: does the error message clearly tell the developer what the problem is? I think it does. Then I think it is all fine. Whether void is a type or not is an academic discussion with little practical relevance. Arne
Back to top | Article view | comp.lang.java.programmer
csiph-web