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


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

Re: void

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Steven Simpson <ss@my.domain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: void
Date Sun, 17 Jul 2016 09:07:35 +0100
Organization A noiseless patient Spider
Lines 20
Message-ID <7vqr5d-i7q.ln1@s.simpson148.btinternet.com> (permalink)
References <void-20160716231330@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="dea6e33f83a7656c668e0e6fc8625b50"; logging-data="25587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kDqIdNimDw7XGkaNE5MGyqmGKZS1muwU="
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
In-Reply-To <void-20160716231330@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:4JrB44pu+BFh4brqq1aeVst22c4=
Xref csiph.com comp.lang.java.programmer:34935

Show key headers only | 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