Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #27096
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | markspace <markspace@nospam.nospam> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: literals and keywords |
| Date | Sat, 28 Dec 2013 08:59:49 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <l9n026$7to$1@dont-email.me> (permalink) |
| References | <keywords-20131228171259@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 28 Dec 2013 16:59:51 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="91501def0eac4f57a6c0156592d51e96"; logging-data="8120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yWVYaVYRqXs6Dzl6dDHpoNN4frgfjecw=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
| In-Reply-To | <keywords-20131228171259@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:bfH1RSwhFzEHIekLMpyWyutgW3s= |
| Xref | csiph.com comp.lang.java.programmer:27096 |
Show key headers only | View raw
On 12/28/2013 8:15 AM, Stefan Ram wrote: > Does it matter? > > Can you find any program, where one can observe the difference? > E.g., some program that does compile because they are not keywords, > but would not compile when they were keywords, or vice versa? > Or are there any other observable consequences of this difference? > Yes, it matters, or they wouldn't make a distinction. We talked about this already: literals can be used in expressions, keywords can't. The observable difference is in the implementation of the JLS. <http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.8> You can write "int i = 1 + 2;" but you can't write "Object o = for + try;" because that section of the JLS says so. Read it.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 08:59 -0800
Re: literals and keywords "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-12-28 17:28 +0000
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 10:56 -0800
Re: literals and keywords Arne Vajhøj <arne@vajhoej.dk> - 2013-12-28 14:53 -0500
Re: literals and keywords markspace <markspace@nospam.nospam> - 2013-12-28 12:41 -0800
Re: literals and keywords Arne Vajhøj <arne@vajhoej.dk> - 2013-12-28 16:36 -0500
csiph-web