2 ms·
Each time (e.g., Rust, Go, Carbon, Cppfront, ...) before clicking, I hope that people would remember that Pascal pointer syntax is better than C's convoluted '*
by beeforpork 4y ago
Each time (e.g., Rust, Go, Carbon, Cppfront, ...) before clicking, I hope that people would remember that Pascal pointer syntax is better than C's convoluted '*' and '->' and '.'. So far, I've been disappointed. I mean:
'p.x' just like 'p.x' in C, but
'p^' instead of '*p' and
'p^.x' instead of 'p->x' and
'p^^.x' instead of '(*p)->x'.
Just admit it: Pascal is nice, clean, compositional, and less surprising.
Don't you remember? Or do you honestly think that C syntax is better?*
- yencabulator 4y agoSince you mentioned Go.. Go does a very programmer-friendly thing where v.x and p->x are both spelled y.x -- the compiler knows whether the left side is a pointer or not, and v->x and p.x would always be errors, so they eliminated the invalid syntax and simplified to always using dot.