this post was submitted on 26 Jul 2026
29 points (70.4% liked)
Technology
86679 readers
3333 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't think this is a related at all. C could have easily decided that the definition makes both
xandypointers. They just decided not to so that you can declare more variables on one line by being able to doint x, *y, **z, .... It is more flexible.Similarly that Go line could have been parsed like
var x, (y*) intif they wanted to. They just made a different choice.That's because declaring several variables on the same line is syntactic sugar, although I agree it makes little sense this way
That's why you write
int *x, y, **z;
C doesn't write like "x is an int-pointer", rather it says "dereferencing x will get you an int".
100% and why I think
int*should be at the least a compiler warning, perhaps an outright error with pedantic enabled.