News for hackers. Stuff that matters.
Re:Go's Declaration Syntax (2010) by tormeh on Sunday November 23, 2014 @09:54AM (#8648914)
Yeah, or that the declaration syntax of pointers are "intended to be a mnemonic". It's syntactic sugar that, instead of being a convenience, simply misleads you. C is a language where you need to know what's going on and because of these weird decisions knowing how things work actively hinders you when writing code.

int p; type nameOfInstanceOfType;

int *p; notType notNameOfInstanceOfType;

How about something sane like: "pointer p = pointer(int)" or even Scalalike "pointer[int] p"? Pointers aren't so bad really. I think a lot of the hate for them is because the syntax begs you to fuck up. And inevitably you do. I mean, I just type random stuff until I get no warnings and things look like they work. Literally. That's how I program. How many asterisks here? I dunno, I'll just try zero through three and see if any of those work...

Re:Go's Declaration Syntax (2010) by jeorgun on Monday November 24, 2014 @01:31AM (#8651300)

    int* p;
Follows the Type NameOfVar pattern, though of course it breaks for multiple simultaneous declarations.