matt wrote:
> > HA, if C lent itself to readability then the * for pointer stuff would not be
> > used like it is.
> >
> > I'd like to see a C like this:
> >
> > ptr int this-is-a-pointer-to-an-int ;
> >
> > ptr char char-pointer ;
> >
> > It is kind of backwards trying to define a pointer variable name in terms of
> > what it points to:
> >
> > int *this-is-a-pointer-to-an-int ;
> >
> > This is saying that the variable, whose type *really* isn't explicitly stated,
> > "this-is-a-pointer-to-an-int" when dereferenced gives you an int, so thus by
> > inference, this-is-a-pointer-to-an-int *must* be a pointer to an int. Now that
> > is BACKWARDS IMHO!
>
> ok, heres my 2c if thats what you want, then why not
> make up your own header file "c-2.h" or whatever... and
> stick in something like this...
>
> typedef int *ptr_int;
> typedef char *ptr_char;
>
> than you can say:
>
> ptr_int this-is-a-pointer-to-an-int;
> ptr_char char-pointer;
Yes, but if you wanted it to work for all types, c-2.h would be
infinitely long.
I would agree that C's type syntax is probably not one of its better
features, although it probably seemed like a good idea at the time.
The syntax of function types is particularly bad.
--
Glynn Clements <[EMAIL PROTECTED]>