On Sat, 29 Aug 1998, Moshe Zadka wrote:
> On Sat, 29 Aug 1998, David Ross wrote:
>
> > From the K&R C book I understand that the language syntax was
> > intentionally kept
> > small to avoid "scope creep" that would lead to LANGUAGE bloat (e.g. P/L 1).
> > Language design like the rest of life is filled with trade-offs.
> >
> > Your prefered syntax is clearer and consistent with close corresondence or
at
> > least access to the underlying machine architecture, another of C's design
> > goals. I have always found bit twiddling cumbersum at best. We can only
> > assume
> > that hex and octal representation provided the access and/or that literal
bit
> > strings were "deprecated" and "counter-revolutionary" in the late sixties
and
> > early seventies.
> >
> Well, just adding another base (and a power 2 base, at that) doesn't look
> like that much of a feature bloat.
> I mean, yeah, right, octal and hexadecimal but no binary?
> Doesn't that look like K&R cared only for 2 machines (one with 9 bit words
> and another with 8 bit words)...
>
> Anyway, I though about implementing a preprocessor for C that would
> convert 0b numbers to hexadecimal numbers, but never got around to it.
>
You don't have to expend the effort. Larry Wall has already provided the
"pre-processor". It would only take a few files of PERL to create a filter. All
of the syntacical sugar you seek (and more) has native support; would take a few
lines of PERL code; or roll your own extension.
David Ross
[EMAIL PROTECTED]
Toad Technologies
"I'll be good! I will, I will !"