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


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

Re: the true literal

Started byJeff Higgins <jeff@invalid.invalid>
First post2013-11-21 23:23 -0500
Last post2013-11-27 13:51 -0800
Articles 18 — 5 participants

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: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-21 23:23 -0500
    Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-21 23:54 -0500
    Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 07:55 -0500
    Re: the true literal Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-11-22 09:37 -0500
      Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 11:07 -0500
        Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 11:53 -0500
          Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 12:11 -0500
            Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 12:24 -0500
              Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 12:37 -0500
        Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 13:08 -0500
        Re: the true literal Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-11-22 13:33 -0500
          Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 14:39 -0500
            Re: the true literal Jeff Higgins <jeff@invalid.invalid> - 2013-11-22 17:38 -0500
              [OT] Re: the true literal Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-11-22 17:59 -0500
              Re: the true literal Martin Gregorie <martin@address-in-sig.invalid> - 2013-11-23 16:27 +0000
                Re: the true literal Sebastian <news@seyweiler.dyndns.org> - 2013-11-23 21:24 +0100
                  Re: the true literal Martin Gregorie <martin@address-in-sig.invalid> - 2013-11-23 21:23 +0000
                  Re: the true literal Lew <lewbloch@gmail.com> - 2013-11-27 13:51 -0800

#26566 — Re: the true literal

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-21 23:23 -0500
SubjectRe: the true literal
Message-ID<l6mmac$g1o$1@dont-email.me>
On 11/21/2013 09:24 PM, Stefan Ram wrote:
>    The JLS says:
>
>        »While true and false might appear to be keywords,
>        they are technically Boolean literals (§3.10.3).«
>
>    What is a keyword?
>
>    I used to think that a keyword is a word(s)

You'll need to adjust your intuition.

-------------------------------------------------------------

 >    whose meaning is given by the language specification

3.10.3. Boolean Literals

The boolean type has two values, represented by the boolean literals 
true and false, formed from ASCII letters.

BooleanLiteral: one of
     true false

A boolean literal is always of type boolean (§4.2.5).

------------------------------------------------------------

 >    and that cannot be declared as an identifier in source code.

3.8. Identifiers

An identifier is an unlimited-length sequence of Java letters and Java 
digits, the first of which must be a Java letter.


Identifier:
     IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral

----------------------------------------------------------------

 >    I believe that all of this applies to »true«.

The meaning of true is given in the JLS.
A BooleanLiteral cannot be used as an Identifier.

------------------------------------------------------------


 >    So, why then it is not called a keyword in Java?

3.9. Keywords

50 character sequences, formed from ASCII letters, are reserved for use 
as keywords and cannot be used as identifiers (§3.8).


Keyword: one of
     abstract   continue   for          new         switch
     assert     default    if           package     synchronized
     boolean    do         goto         private     this
     break      double     implements   protected   throw
     byte       else       import       public      throws
     case       enum       instanceof   return      transient
     catch      extends    int          short       try
     char       final      interface    static      void
     class      finally    long         strictfp    volatile
     const      float      native       super       while

Because it is a boolean literal?

boolean t_;
if ( !t_ )
t_ = true;

[toc] | [next] | [standalone]


#26567

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-21 23:54 -0500
Message-ID<l6mo35$n5g$1@dont-email.me>
In reply to#26566
On 11/21/2013 11:23 PM, Jeff Higgins wrote:
> On 11/21/2013 09:24 PM, Stefan Ram wrote:
>>    The JLS says:
>>
>>        »While true and false might appear to be keywords,
>>        they are technically Boolean literals (§3.10.3).«
>>
>>    What is a keyword?
       What is a specification?

[toc] | [prev] | [next] | [standalone]


#26572

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 07:55 -0500
Message-ID<l6nk94$tg7$1@dont-email.me>
In reply to#26566
On 11/21/2013 11:23 PM, Jeff Higgins wrote:
> On 11/21/2013 09:24 PM, Stefan Ram wrote:
>>    The JLS says:
>>
>>        »While true and false might appear to be keywords,
>>        they are technically Boolean literals (§3.10.3).«
>>
>>    What is a keyword?
       What is a reserved word?
This article makes a distinction.
<http://en.wikipedia.org/wiki/Reserved_word>

[toc] | [prev] | [next] | [standalone]


#26575

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2013-11-22 09:37 -0500
Message-ID<l6nq6v$134$1@dont-email.me>
In reply to#26566
On 11/21/2013 11:23 PM, Jeff Higgins wrote:
> [...]
> 3.9. Keywords
>
> 50 character sequences, formed from ASCII letters, are reserved for use
> as keywords and cannot be used as identifiers (§3.8).
>
> Keyword: one of
>      abstract   continue   for          new         switch
>      assert     default    if           package     synchronized
>      boolean    do         goto         private     this
>      break      double     implements   protected   throw
>      byte       else       import       public      throws
>      case       enum       instanceof   return      transient
>      catch      extends    int          short       try
>      char       final      interface    static      void
>      class      finally    long         strictfp    volatile
>      const      float      native       super       while

     Note the absence of `null' from this list. The situation
seems very similar to that of `true' and `false': all three
are "literals" rather than "keywords".  These literals happen
to be spelled entirely with letters rather than with arcane
symbol clusters like `314.159e-2', but they're still "literals".

     To me, this seems a good example of a "difference that makes
no difference" -- but a hair-splitting literal-ist (sorry) might
find a difference just so he can feel smug about it.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#26576

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 11:07 -0500
Message-ID<l6nvi4$1vt$1@dont-email.me>
In reply to#26575
On 11/22/2013 09:37 AM, Eric Sosman wrote:
> On 11/21/2013 11:23 PM, Jeff Higgins wrote:
>> [...]
>> 3.9. Keywords
>>
>> 50 character sequences, formed from ASCII letters, are reserved for use
>> as keywords and cannot be used as identifiers (§3.8).
>>
>> Keyword: one of
>>      abstract   continue   for          new         switch
>>      assert     default    if           package     synchronized
>>      boolean    do         goto         private     this
>>      break      double     implements   protected   throw
>>      byte       else       import       public      throws
>>      case       enum       instanceof   return      transient
>>      catch      extends    int          short       try
>>      char       final      interface    static      void
>>      class      finally    long         strictfp    volatile
>>      const      float      native       super       while
>
>      Note the absence of `null' from this list. The situation
> seems very similar to that of `true' and `false': all three
> are "literals" rather than "keywords".  These literals happen
> to be spelled entirely with letters rather than with arcane
> symbol clusters like `314.159e-2', but they're still "literals".
>
>      To me, this seems a good example of a "difference that makes
> no difference" -- but a hair-splitting literal-ist (sorry) might
> find a difference just so he can feel smug about it.
>
I wish I had found <http://en.wikipedia.org/wiki/Reserved_word>
before I had first responded to the OP. I think it will be a
satisfactory answer to his question.

In general discussion, including usenet, a hair-splitting literal-ist
(ok?) stance can be taken, and motivated by smug. Specification writers,
compiler writers, general purpose program writers,and others might
have other motivations. I'm certain that Stefan Ram was not seeking an
answer to his question in preparation to take a smug stance in some
discussion. My motivation to respond to Stefan's question was not smug,
even if it appeared hair-splitting and literalist. Other respondents
have not come off as smug to me. The (online) Free Dictionary has
literalist as a noun and literalistic as an adjective.

[toc] | [prev] | [next] | [standalone]


#26577

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 11:53 -0500
Message-ID<l6o27p$iki$1@dont-email.me>
In reply to#26576
How to pronounce analyticity.

[toc] | [prev] | [next] | [standalone]


#26578

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 12:11 -0500
Message-ID<l6o38m$nv9$1@dont-email.me>
In reply to#26577
On 11/22/2013 11:53 AM, Jeff Higgins wrote:
> How to pronounce analyticity.
ratiocinative?

[toc] | [prev] | [next] | [standalone]


#26579

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 12:24 -0500
Message-ID<l6o41h$to4$1@dont-email.me>
In reply to#26578
On 11/22/2013 12:11 PM, Jeff Higgins wrote:
> On 11/22/2013 11:53 AM, Jeff Higgins wrote:
>> How to pronounce analyticity.
> ratiocinative?
illative?

[toc] | [prev] | [next] | [standalone]


#26580

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 12:37 -0500
Message-ID<l6o4qb$2f6$1@dont-email.me>
In reply to#26579
On 11/22/2013 12:24 PM, Jeff Higgins wrote:
> On 11/22/2013 12:11 PM, Jeff Higgins wrote:
>> On 11/22/2013 11:53 AM, Jeff Higgins wrote:
>>> How to pronounce analyticity.
>> ratiocinative?
> illative?
<http://www.ndc.edu/mccloskey_newman/illative.htm>

[toc] | [prev] | [next] | [standalone]


#26581

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 13:08 -0500
Message-ID<l6o6l1$e15$1@dont-email.me>
In reply to#26576
On 11/22/2013 11:07 AM, Jeff Higgins wrote:
> I wish I had found <http://en.wikipedia.org/wiki/Reserved_word>
> before I had first responded to the OP. I think it will be a
> satisfactory answer to his question.
<http://en.wikipedia.org/wiki/Sense_and_reference>

[toc] | [prev] | [next] | [standalone]


#26582

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2013-11-22 13:33 -0500
Message-ID<l6o81v$mpu$1@dont-email.me>
In reply to#26576
On 11/22/2013 11:07 AM, Jeff Higgins wrote:
> On 11/22/2013 09:37 AM, Eric Sosman wrote:
>>[...]
>>      To me, this seems a good example of a "difference that makes
>> no difference" -- but a hair-splitting literal-ist (sorry) might
>> find a difference just so he can feel smug about it.
> [...]
> In general discussion, including usenet, a hair-splitting literal-ist
> (ok?) stance can be taken, and motivated by smug. Specification writers,
> compiler writers, general purpose program writers,and others might
> have other motivations. I'm certain that Stefan Ram was not seeking an
> answer to his question in preparation to take a smug stance in some
> discussion. My motivation to respond to Stefan's question was not smug,
> even if it appeared hair-splitting and literalist. Other respondents
> have not come off as smug to me. The (online) Free Dictionary has
> literalist as a noun and literalistic as an adjective.

     Jeff, I intended to apply the word "smug" to the writers
of the JLS, not to you nor to Stefan nor to anyone else in
this thread.  If my post came across as insulting, I humbly
crave pardon; I should know by now that Usenet does not always
convey nuance well, and should not have expected that wryness
would come across as such.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#26583

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 14:39 -0500
Message-ID<l6obvp$f6d$1@dont-email.me>
In reply to#26582
On 11/22/2013 01:33 PM, Eric Sosman wrote:
> On 11/22/2013 11:07 AM, Jeff Higgins wrote:
>> On 11/22/2013 09:37 AM, Eric Sosman wrote:
>>> [...]
>>>      To me, this seems a good example of a "difference that makes
>>> no difference" -- but a hair-splitting literal-ist (sorry) might
>>> find a difference just so he can feel smug about it.
>> [...]
>> In general discussion, including usenet, a hair-splitting literal-ist
>> (ok?) stance can be taken, and motivated by smug. Specification writers,
>> compiler writers, general purpose program writers,and others might
>> have other motivations. I'm certain that Stefan Ram was not seeking an
>> answer to his question in preparation to take a smug stance in some
>> discussion. My motivation to respond to Stefan's question was not smug,
>> even if it appeared hair-splitting and literalist. Other respondents
>> have not come off as smug to me. The (online) Free Dictionary has
>> literalist as a noun and literalistic as an adjective.
>
>      Jeff, I intended to apply the word "smug" to the writers
> of the JLS, not to you nor to Stefan nor to anyone else in
> this thread.

If I were in a cafe eating and drinking with a group that included
writers of the JLS I would tolerate a smug attitude up to a point.
The JLS is a fine specification as specifications go.

> If my post came across as insulting, I humbly
> crave pardon; I should know by now that Usenet does not always
> convey nuance well, and should not have expected that wryness
> would come across as such.
>

I appreciate the wryness, and other fine qualities of your posts
to this group. I hate smug posts, and try hard (perhaps not always
successfully) not to produce one. A lot of coffee this AM, may be
time for a sandwich an a more soothing beverage.

[toc] | [prev] | [next] | [standalone]


#26584

FromJeff Higgins <jeff@invalid.invalid>
Date2013-11-22 17:38 -0500
Message-ID<l6omfi$f8f$1@dont-email.me>
In reply to#26583
On 11/22/2013 02:39 PM, Jeff Higgins wrote:

> ... I would tolerate a smug attitude up to a point.

"... errant pedantry up with which I will not put."
anon attrib to Winston Churchill

[toc] | [prev] | [next] | [standalone]


#26585 — [OT] Re: the true literal

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2013-11-22 17:59 -0500
Subject[OT] Re: the true literal
Message-ID<l6onk0$kl5$1@dont-email.me>
In reply to#26584
On 11/22/2013 5:38 PM, Jeff Higgins wrote:
> On 11/22/2013 02:39 PM, Jeff Higgins wrote:
>
>> ... I would tolerate a smug attitude up to a point.
>
> "... errant pedantry up with which I will not put."
> anon attrib to Winston Churchill

     Thanks for outpointing, upbringing, and forthputting that.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#26588

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2013-11-23 16:27 +0000
Message-ID<l6ql15$78s$1@dont-email.me>
In reply to#26584
On Fri, 22 Nov 2013 17:38:58 -0500, Jeff Higgins wrote:

> On 11/22/2013 02:39 PM, Jeff Higgins wrote:
> 
>> ... I would tolerate a smug attitude up to a point.
> 
> "... errant pedantry up with which I will not put."
> anon attrib to Winston Churchill

But Churchill was being very specific about English grammar: he was 
objecting to split infinitives, not pedantry or poor grammar in general.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#26589

FromSebastian <news@seyweiler.dyndns.org>
Date2013-11-23 21:24 +0100
Message-ID<l6r2vl$l95$1@news.albasani.net>
In reply to#26588
Am 23.11.2013 17:27, schrieb Martin Gregorie:
> On Fri, 22 Nov 2013 17:38:58 -0500, Jeff Higgins wrote:
>
>> On 11/22/2013 02:39 PM, Jeff Higgins wrote:
>>
>>> ... I would tolerate a smug attitude up to a point.
>>
>> "... errant pedantry up with which I will not put."
>> anon attrib to Winston Churchill
>
> But Churchill was being very specific about English grammar: he was
> objecting to split infinitives, not pedantry or poor grammar in general.
>
>
and the attribution of this saying to Churchill is likely to be
mistaken, see
http://itre.cis.upenn.edu/~myl/languagelog/archives/001715.html

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#26590

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2013-11-23 21:23 +0000
Message-ID<l6r6dd$93u$1@dont-email.me>
In reply to#26589
On Sat, 23 Nov 2013 21:24:47 +0100, Sebastian wrote:

> Am 23.11.2013 17:27, schrieb Martin Gregorie:
>> On Fri, 22 Nov 2013 17:38:58 -0500, Jeff Higgins wrote:
>>
>>> On 11/22/2013 02:39 PM, Jeff Higgins wrote:
>>>
>>>> ... I would tolerate a smug attitude up to a point.
>>>
>>> "... errant pedantry up with which I will not put."
>>> anon attrib to Winston Churchill
>>
>> But Churchill was being very specific about English grammar: he was
>> objecting to split infinitives, not pedantry or poor grammar in
>> general.
>>
>>
> and the attribution of this saying to Churchill is likely to be
> mistaken, see
> http://itre.cis.upenn.edu/~myl/languagelog/archives/001715.html
>
It should be very simple to check Glenvil Hall's plea for clearer English 
anyway: if it was made in the House it will be printed in Hansard, for 
the Thursday before the 20th of March, 1948 or possibly a week earlier.

However, I'd find it very unlikely that Churchill made such a mistake: he 
was always very proud of the fact that the 'clever boys' at his school 
had to learn Latin and Greek but, as he wasn't one of them, he'd had to 
study English grammar instead and that this had served him better than 
learning Latin or Greek would have.

In any case, in the context of the current discussion it is quite 
irrelevant whether Churchill did or did not make that remark. As I said, 
it, regardless of who said it, is about the benefits or otherwise of 
using split infinitives. These are utterly irrelevant to Java and have 
nothing whatsoever to do with whether the reserved words true and false 
(or null for that matter) are predefined literals, identifiers or some 
other syntactic element.
 

-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#26643

FromLew <lewbloch@gmail.com>
Date2013-11-27 13:51 -0800
Message-ID<286dbefc-6500-4541-826a-77878f9fbb15@googlegroups.com>
In reply to#26589
On Saturday, November 23, 2013 12:24:47 PM UTC-8, Sebastian wrote:
> Am 23.11.2013 17:27, schrieb Martin Gregorie:
> 
> > On Fri, 22 Nov 2013 17:38:58 -0500, Jeff Higgins wrote:
> 
> >
> 
> >> On 11/22/2013 02:39 PM, Jeff Higgins wrote:
> 
> >>
> 
> >>> ... I would tolerate a smug attitude up to a point.
> 
> >>
> 
> >> "... errant pedantry up with which I will not put."
> 
> >> anon attrib to Winston Churchill
> 
> >
> 
> > But Churchill was being very specific about English grammar: he was
> 
> > objecting to split infinitives, not pedantry or poor grammar in general.
> 
> >
> 
> >
> 
> and the attribution of this saying to Churchill is likely to be
> 
> mistaken, see
> 
> http://itre.cis.upenn.edu/~myl/languagelog/archives/001715.html
> 
> 
> 
> -- Sebastian

I thought it was *arrant* pedantry up with which he (apocryphally) would not put.

-- 
Lew

[toc] | [prev] | [standalone]


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


csiph-web