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


Groups > comp.lang.forth > #10132

Re: Question on CHAR and [CHAR]

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Question on CHAR and [CHAR]
Date 2012-03-15 12:05 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2012Mar15.130556@mips.complang.tuwien.ac.at> (permalink)
References (2 earlier) <71159a8f-832e-4701-9740-29357e7b024e@eb6g2000vbb.googlegroups.com> <jjrggf$jp7$2@news-01.bur.connect.com.au> <jjs87p$pf4$1@speranza.aioe.org> <op.wa7i6kjasu5d0p@david> <c5mdnUzSibGhTPzSnZ2dnUVZ_q6dnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>Well, they are redundant language feaures: you might as well say that
>given [char], the characher literal is not required.  Why should
>anyone prefer the "new" syntax?  AFAICS its only advantage is that
>it's more familiar to C programmers.  Which is perhaps the point?

A few advantages that you failed to see:

+ Code containing literals works the same inside and outside of colon
definitions, in contrast to code containing [CHAR] or CHAR.

+ Character literals are shorter.

The familiarity to C is, of course, a big disadvantage in the eyes of
some; maybe we should have standardized ~*A=! as syntax instead of 'A'
to eliminate this disadvantage, despite 'A' being common practice (I
also considered 'A, but it was less common).

While we are at similarities to C, somebody complained that we
standardized $ff instead of 0xff.  I considered both (plus ffH) in my
proposal; $ff was supported by all systems I looked at, while 0xff had
significantly less support, and ffH even less.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2011: http://www.euroforth.org/ef11/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Question on CHAR and [CHAR] "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-11 06:10 -0400
  Re: Question on CHAR and [CHAR] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-11 06:03 -0500
  Re: Question on CHAR and [CHAR] Coos Haak <chforth@hccnet.nl> - 2012-03-11 13:09 +0100
    Re: Question on CHAR and [CHAR] "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-12 19:43 -0400
      Re: Question on CHAR and [CHAR] "Elizabeth D. Rather" <erather@forth.com> - 2012-03-12 16:22 -1000
        Re: Question on CHAR and [CHAR] Mark Wills <markrobertwills@yahoo.co.uk> - 2012-03-13 03:23 -0700
        Re: Question on CHAR and [CHAR] Josh Grams <josh@qualdan.com> - 2012-03-13 12:51 +0000
  Re: Question on CHAR and [CHAR] Josh Grams <josh@qualdan.com> - 2012-03-11 17:11 +0000
    Re: Question on CHAR and [CHAR] Jean-Bernard Faucon <jb@nospam.com> - 2012-03-11 21:34 +0100
    Re: Question on CHAR and [CHAR] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-12 10:45 +0000
  Re: Question on CHAR and [CHAR] BruceMcF <agila61@netscape.net> - 2012-03-11 13:57 -0700
  Re: Question on CHAR and [CHAR] "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-11 17:06 -0400
    Re: Question on CHAR and [CHAR] Josh Grams <josh@qualdan.com> - 2012-03-11 21:38 +0000
      Re: Question on CHAR and [CHAR] "Elizabeth D. Rather" <erather@forth.com> - 2012-03-11 14:12 -1000
    Re: Question on CHAR and [CHAR] BruceMcF <agila61@netscape.net> - 2012-03-11 18:42 -0700
    Re: Question on CHAR and [CHAR] Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-12 11:13 +0000
      Re: Question on CHAR and [CHAR] "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-12 19:46 -0400
        Re: Question on CHAR and [CHAR] "Elizabeth D. Rather" <erather@forth.com> - 2012-03-12 16:56 -1000
  Re: Question on CHAR and [CHAR] "Ed" <nospam@invalid.com> - 2012-03-14 16:35 +1100
    Re: Question on CHAR and [CHAR] Alex McDonald <blog@rivadpm.com> - 2012-03-14 08:49 -0700
      Re: Question on CHAR and [CHAR] "Ed" <nospam@invalid.com> - 2012-03-15 12:29 +1100
        Re: Question on CHAR and [CHAR] "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-15 04:11 -0400
          Re: Question on CHAR and [CHAR] "Peter Knaggs" <pjk@bcs.org.uk> - 2012-03-15 10:24 +0000
            Re: Question on CHAR and [CHAR] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-15 06:23 -0500
              Re: Question on CHAR and [CHAR] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-15 12:05 +0000
                Re: Question on CHAR and [CHAR] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-15 08:19 -0500
          Re: Question on CHAR and [CHAR] "Ed" <nospam@invalid.com> - 2012-03-17 13:17 +1100
            Re: Question on CHAR and [CHAR] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-17 15:13 +0000
              Re: Question on CHAR and [CHAR] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-03-18 06:07 -0500
              Re: Question on CHAR and [CHAR] "Ed" <nospam@invalid.com> - 2012-03-18 23:01 +1100
                Re: Question on CHAR and [CHAR] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-18 15:21 +0000
                Re: Question on CHAR and [CHAR] Bernd Paysan <bernd.paysan@gmx.de> - 2012-03-18 23:15 +0100
        Re: Question on CHAR and [CHAR] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-15 11:59 +0000
    Re: Question on CHAR and [CHAR] "Ed" <nospam@invalid.com> - 2012-03-15 12:29 +1100

csiph-web