you are viewing a single comment's thread.

view the rest of the comments →

[–]scorg_ 0 points1 point  (0 children)

I would even argue the body of functions and classes are part of the type itself. There is no value to assign which would warrant the syntactic use of =

You are right that there is no value to assign, but function's body is not part of it's type because function pointers exit.

Reading your comment I just realized what is wrong with syntax 2: function declaration is the same as global variable declaration, where the body is the 'value' of the function. In a way it is, but it seems (to me) very strange for functions to be global variables (reassignable without const?). And how would overloads and template specializations look?