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


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

Re: void

From Steven Simpson <ss@my.domain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: void
Date 2016-07-17 09:07 +0100
Organization A noiseless patient Spider
Message-ID <7vqr5d-i7q.ln1@s.simpson148.btinternet.com> (permalink)
References <void-20160716231330@ram.dialup.fu-berlin.de>

Show all headers | View raw


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

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


Thread

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

csiph-web