by Zak · 8mo ago · 0 comments
That has to be one of the worst features ever added to a language.
no, OP explicitly had problem after getting introduced to pointer concept
ldr dest, [src, offset]
It's straightforward and pretty hard to mess up, and easy to read to because the format is consistent.Whereas in C all the following are valid (and it becomes even more confusing with assignment in the declaration statement, tons of footguns and weird syntax):
int* a;
int *a;
int a[];
int a[5];
Assignment is weird too, especially because dereferencing and defining a pointer both use '*'. *a = c;
a[0] = c;
Then you have structs/unions and their members, and what if those are pointers? You get . and -> syntax. It's weird and complicated, much much more complicated than assembly. That's before you get to casting and types which make C much more complicated than assembly for doing low level stuff.In particular I think people are very confused by declaring pointers and the overloaded meaning of the dereference operator.