9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul+plan9@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] NaN, +Inf, and -Inf, constants?
Date: Sun,  7 Feb 2010 15:16:02 -0800	[thread overview]
Message-ID: <20100207231603.279A35B23@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Sun, 07 Feb 2010 15:19:58 MST." <a55104d5a009d762eeb15be25d31a7e8@yyc.orthanc.ca>

On Sun, 07 Feb 2010 15:19:58 MST "Lyndon Nerenberg (VE6BBM/VE7TFX)" <lyndon@orthanc.ca>  wrote:
> > i suspect the rationale was that, finally, C provided a way
> > outside the preprocessor to give symbolic names to constants.
> > why restrict that to int?
>
> Because enum's have been int's since their inception?
>
> I'm sympathetic to the underlying need, but making a fundamental
> type of the language suddenly become variable does not seem to
> be the right way of going about this.
>
> E.g., what is the type of:
>
> enum {
> 	a = 1,
> 	b = 2.44000000000000000000618549L,
> 	c = 2.44F,
> 	d = "this is weird",
> 	e = 1LL<<62,
> } foo;

The cleanest solution would be to treat C's _static const_
"variables" as as compile time constants. I wish the standard
dictated this.



      parent reply	other threads:[~2010-02-07 23:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 15:38 Tristan Plumb
2010-02-06 15:57 ` erik quanstrom
2010-02-06 17:14   ` Tristan Plumb
2010-02-07 16:12     ` erik quanstrom
2010-02-07  0:06 ` Russ Cox
2010-02-07 10:46   ` Charles Forsyth
2010-02-07 11:05     ` Charles Forsyth
2010-02-07 20:01     ` Russ Cox
2010-02-07 20:31       ` erik quanstrom
2010-02-07 21:33       ` Charles Forsyth
2010-02-07 22:19         ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2010-02-07 22:37           ` erik quanstrom
2010-02-08 16:39             ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2010-02-08 18:48               ` Russ Cox
2010-02-07 23:16           ` Bakul Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100207231603.279A35B23@mail.bitblocks.com \
    --to=bakul+plan9@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).