Click here to Skip to main content
14,920,714 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: C declarations are half backward Pin
PaltryProgrammer30-Nov-20 8:38
MemberPaltryProgrammer30-Nov-20 8:38 
GeneralRe: C declarations are half backward Pin
Stuart Dootson30-Nov-20 5:53
professionalStuart Dootson30-Nov-20 5:53 
GeneralRe: C declarations are half backward Pin
Stuart Dootson30-Nov-20 5:52
professionalStuart Dootson30-Nov-20 5:52 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 5:54
mvahoney the codewitch30-Nov-20 5:54 
GeneralRe: C declarations are half backward Pin
Member 1330167930-Nov-20 8:18
MemberMember 1330167930-Nov-20 8:18 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 8:26
mvahoney the codewitch30-Nov-20 8:26 
GeneralRe: C declarations are half backward Pin
Member 1330167930-Nov-20 8:49
MemberMember 1330167930-Nov-20 8:49 
GeneralRe: C declarations are half backward Pin
harold aptroot30-Nov-20 9:50
Memberharold aptroot30-Nov-20 9:50 
It bothers me to no end. Actually what bothers me even more is that every time I mention it, I mostly get replies defending the stupid Spiral of Death. It's bad enough that it's bad, but worse that people feel this kind of Stockholm Syndrome towards a type syntax that just doesn't make sense. (in some sense it's not even a type syntax, because it's not just a type, there's a declaration stuck in the middle of it)

Anyway I'll show you something even worse, the syntax for returning a function pointer. Let's say you want to return a pointer to a function that takes two ints and returns an int, a function like int add(int a, int b) maybe. It would look like this:
int (*getFunc())(int, int) { … }
Unless you use a typedef of course (in C# that is essentially mandatory: you must declare a delegate with the signature first and then you can use that).
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 10:10
mvahoney the codewitch30-Nov-20 10:10 
GeneralRe: C declarations are half backward Pin
PaltryProgrammer30-Nov-20 21:46
MemberPaltryProgrammer30-Nov-20 21:46 
GeneralRe: C declarations are half backward Pin
harold aptroot1-Dec-20 1:33
Memberharold aptroot1-Dec-20 1:33 
GeneralRe: C declarations are half backward Pin
PaltryProgrammer1-Dec-20 7:30
MemberPaltryProgrammer1-Dec-20 7:30 
GeneralRe: C declarations are half backward Pin
Julie77730-Nov-20 13:36
MemberJulie77730-Nov-20 13:36 
GeneralRe: C declarations are half backward Pin
PaltryProgrammer30-Nov-20 22:41
MemberPaltryProgrammer30-Nov-20 22:41 
GeneralRe: C declarations are half backward Pin
mike@codeproject3-Dec-20 17:44
Membermike@codeproject3-Dec-20 17:44 
GeneralDo you know / trust this site? Pin
Nelek28-Nov-20 5:28
protectorNelek28-Nov-20 5:28 
GeneralRe: Do you know / trust this site? Pin
OriginalGriff28-Nov-20 6:25
mveOriginalGriff28-Nov-20 6:25 
GeneralRe: Do you know / trust this site? Pin
Nelek28-Nov-20 10:02
protectorNelek28-Nov-20 10:02 
GeneralRe: Do you know / trust this site? Pin
OriginalGriff28-Nov-20 10:15
mveOriginalGriff28-Nov-20 10:15 
GeneralRe: Do you know / trust this site? Pin
dandy7228-Nov-20 11:19
Memberdandy7228-Nov-20 11:19 
GeneralRe: Do you know / trust this site? Pin
OriginalGriff28-Nov-20 11:33
mveOriginalGriff28-Nov-20 11:33 
GeneralRe: Do you know / trust this site? Pin
dandy7229-Nov-20 2:53
Memberdandy7229-Nov-20 2:53 
GeneralRe: Do you know / trust this site? Pin
RedDk28-Nov-20 6:50
MemberRedDk28-Nov-20 6:50 
GeneralRe: Do you know / trust this site? Pin
Cp-Coder28-Nov-20 7:24
MemberCp-Coder28-Nov-20 7:24 
GeneralRe: Do you know / trust this site? Pin
Nelek28-Nov-20 10:01
protectorNelek28-Nov-20 10:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.