DEV Community

[Comment from a deleted post]
 
Sloan, the sloth mascot
Comment deleted
 
pentacular profile image
pentacular

Your claim is that "int* a;" is more portable and less confusing.

So I'm asking what "int* a, b;" does to see if you've really thought it through.

What is the type of b given this declaration?

 
Sloan, the sloth mascot
Comment deleted
 
pentacular profile image
pentacular • Edited

So, given "int* a, b;" what is the type of b?

 
Sloan, the sloth mascot
Comment deleted
 
pentacular profile image
pentacular

What's implicit about those declarations?

My point is that because "int* a, b;" has that kind of confusing behavior, it's odd to claim that you chose it because it is the least confusing syntax.

There are many good arguments for it, but least confusing doesn't seem to be one of them. :)

 
Sloan, the sloth mascot
Comment deleted
 
pentacular profile image
pentacular

By all means. :)