From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Sun, 07 Feb 2010 15:19:58 MST." References: From: Bakul Shah Date: Sun, 7 Feb 2010 15:16:02 -0800 Message-Id: <20100207231603.279A35B23@mail.bitblocks.com> Subject: Re: [9fans] NaN, +Inf, and -Inf, constants? Topicbox-Message-UUID: d02a0270-ead5-11e9-9d60-3106f5b1d025 On Sun, 07 Feb 2010 15:19:58 MST "Lyndon Nerenberg (VE6BBM/VE7TFX)" 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.