News for hackers. Stuff that matters.
Re:Modern C, Second Edition by eMSF on Wednesday September 18, 2019 @02:35PM (#21008497)
The point isn't about putting it closer to the variable name, but consistently to the right of what it applies to.

But yes, it is a matter of opinion.

Re:Modern C, Second Edition by mumblemumble on Wednesday September 18, 2019 @02:44PM (#21008595)
I'm only an infrequent C programmer, but that goal interests me simply because it seems unattainable given other aspects of C's syntax. If qualifiers went to the right of things they qualify, I'd expect variable declarations to look more like:

  foo: int const;
And similarly, function declarations might also take a more ML-like syntax. C seems more like it wants to be an adjectives-before-nouns type of language.
Re:Modern C, Second Edition by guerrilla on Wednesday September 18, 2019 @02:52PM (#21008665)
See wahern and my response to the grandparent.
Re:Modern C, Second Edition by mumblemumble on Wednesday September 18, 2019 @03:14PM (#21008887)
So, IOW, it's not purely a point of style, it's more about what's a sane way to write things given the requirements of the language's syntax when you're dealing with pointer declarations?

Which would explain why it seems so odd to me; I spent a fair amount of time in C-style languages, but typically only ones that lack pointers.

Re:Modern C, Second Edition by guerrilla on Wednesday September 18, 2019 @03:21PM (#21008967)
I think it can be both, plus communication: communication to n00bs, to yourself in the future if you're really tired, etc.
Re:Modern C, Second Edition by mumblemumble on Wednesday September 18, 2019 @04:06PM (#21009498)
Though, if the goal is communication, wouldn't it be clearer still to use typedefs to clean up more complex declarations a bit? Or does that end up making things worse?
Re:Modern C, Second Edition by guerrilla on Wednesday September 18, 2019 @04:10PM (#21009539)
People do that if such a type is used a lot but probably not if it's just a one-off, just like when they write a function instead of using the same snippet a lot but don't if it isn't.
Re:Modern C, Second Edition by kazinator on Wednesday September 18, 2019 @03:09PM (#21008838)
To the right of what it applies to? Like French: Moulin Rouge. :)
Re:Modern C, Second Edition by forty on Wednesday September 18, 2019 @05:02PM (#21010162)
In French it can be either left or right depending on the word: un moulin rouge (a red mill) but un vieux moulin (an old mill)