Skip to main content
Corrected spelling
Source Link
dusan
  • 105
  • 4

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funcitonfunction pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistantinconsistent to me because type declaraitionsdeclarations are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement in function pointers, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funciton pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement in function pointers, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way function pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistent to me because type declarations are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement in function pointers, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

added 21 characters in body
Source Link
EpsilonVector
  • 10.7k
  • 10
  • 59
  • 103

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funciton pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement in function pointers, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funciton pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funciton pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement in function pointers, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

Updated following feedback
Source Link
EpsilonVector
  • 10.7k
  • 10
  • 59
  • 103

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way functionfunciton pointers look in C. TheUsually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration alone definesof the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of itsa variable? What of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement, nor do I appreciate the helldeviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that?! it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

I hate the way function pointers look in C. The pointer declaration alone defines both the type and the name of its variable? What the hell is that?!

EDIT: Following the discussion in the comments I decided to update this answer to explain myself better.

I really hate the way funciton pointers look in C. Usually any variable declaration looks like a tuple of: type varname; Function pointer declarations on the other hand look like a declaration of the function with * before the function name. I can accept this as a description of a pointer type, but in C this declares both the type and the name of a variable of that type. This looks inconsistant to me because type declaraitions are otherwise distinct from variable declarations. struct myStruct{int X; int Y;} only defines a type, it does not define a variable named myStruct. Likewise I see no reason for type declarations and variable declarations to be grouped into one atomic statement, nor do I appreciate the deviation from the type varname; structure.

Someone pointed out that it's consistent with some spiral rule, and that may be the case, but the mark of a good syntax is that it is self explanatory and its internal logic is obvious. The spiral rule is not obvious by any means.

Post Made Community Wiki
Source Link
EpsilonVector
  • 10.7k
  • 10
  • 59
  • 103
Loading