←back to thread

The C23 edition of Modern C

(gustedt.wordpress.com)
515 points bwidlar | 1 comments | | HN request time: 0.295s | source
Show context
RantyDave ◴[] No.41863140[source]
Wait, C programmers now put the star on the left hand side?

char* thing; // good

char *thing; // bad

This ... is awesome. As a C++ "native" I've always found the "star on the right" thing to be really horribly confusing.

replies(2): >>41863280 #>>41880136 #
1. int_19h ◴[] No.41880136[source]
Given that putting it on the right reflects the actual syntax tree of the code, why do you find it "horribly confusing"?

I mean, one can reasonably argue that C & C++ declarator syntax is itself horribly confusing because it doesn't read left-to-right. But it is what it is, so why pretend that it's something else?