Re:The C23 edition of Modern C is now available for free
by layer8 on Tuesday October 15, 2024 @03:23PM
(#41852158)
The idiomatic
(straight from K&R) wouldn’t work without it.
[ Parent
| on HN ]
Re:The C23 edition of Modern C is now available for free
by n_plus_1_acc on Tuesday October 15, 2024 @05:06PM
(#41853132)
Which many people find unreadable compared to other versions.
Re:The C23 edition of Modern C is now available for free
by beeforpork on Wednesday October 16, 2024 @07:24AM
(#41857853)
And for several reasons.
* is it (*s)++ or *(s++)?
* it is not *++s nor ++*s
And I have seen *(*s)++
in some places!It is concise syntax but very confusing.
Re:The C23 edition of Modern C is now available for free
by chongli on Wednesday October 16, 2024 @10:54AM
(#41859785)
K&R actually teaches this as a desirable idiom? People should not be recommending K&R to beginners today!
Re:The C23 edition of Modern C is now available for free
by trealira on Wednesday October 16, 2024 @11:56AM
(#41860622)
Kernighan spends a page whittling strcpy down to just that, with various intermediate versions. After showing you that version, he describes it like this:
Although this may seem cryptic at first sight, the notational convenience is considerable, and the idiom should be mastered, because you will see it frequently in C programs.