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


Groups > comp.lang.java.programmer > #34935 > unrolled thread

Re: void

Started bySteven Simpson <ss@my.domain.invalid>
First post2016-07-17 09:07 +0100
Last post2016-07-17 09:07 +0100
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.


Contents

  Re: void Steven Simpson <ss@my.domain.invalid> - 2016-07-17 09:07 +0100

#34935 — Re: void

FromSteven Simpson <ss@my.domain.invalid>
Date2016-07-17 09:07 +0100
SubjectRe: void
Message-ID<7vqr5d-i7q.ln1@s.simpson148.btinternet.com>
On 16/07/16 23:20, Stefan Ram wrote:
>    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.

Perhaps void is treated exceptionally here because there would be be no 
"value that the method returns", i.e., the exception is made to prevent 
an absurdity being expressed, not because void is not being treated as a 
type.  I think it still messes up a little, as it suggests that void 
cannot be called a return type, which I don't find to be a distinction 
with utility, so I doubt that's the intention.


-- 
ss at comp dot lancs dot ac dot uk

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web