upvote
The reading of `char *p` is: The following things are `char`: `*p`.
reply
I think the only significant mistake was having both prefix and postfix operators for types. If they all neatly sat on one side there would be no problem.
reply
I thought it was a bit of a miss that C didn't use ^ as the pointer sigil. I mean it's literally pointing. I'm guessing some early terminals didn't have that character on the keyboard.
reply
> I thought it was a bit of a miss that C didn't use ^ as the pointer sigil. I mean it's literally pointing. I'm guessing some early terminals didn't have that character on the keyboard.

That can't be the reason; IIRC Pascal has always used '^' for pointer derefencing (just like git's HEAD^^^)

reply
i find Zig does it fairly well. there is also no ambiguity between pointer and multiply.
reply
Yeah, they took it from Pascal:

    var p: ^integer, i: integer;

    p := @i;
    p^ := 42;
Which follows an obvious "if modifier of a base type goes to the left of the type, then the operator that uses this modifier goes to the right in the expression". Just like "array of T/[]T" translates into "arr[index]".
reply
Borrow from the late 1990s upstart GC languages: Pointer<Type>.
reply