Live data from Hacker News

Function overloading in C

gist.github.com

1–10 of 57 posts

Re: Function overloading in C

#7
This whole _Generic stuff is a mistake. There is already a descendant dialect of C which has nice overloading, namely C++.

Analogy: imagine some people aren't happy with the new Fortran. Fortran 66 is the best language ever, and the only flavor of Fortran anyone should use ... except: they like a couple of features from Fortran 2008 and Fortran 90.

So, they whip out the Fortran 66 standard and fork it to create "Fortran Classic" where they just adopt what they like from mainstream Fortran --- and in a totally incompatible way!

And that's basically what C is doing now.

Re: Function overloading in C

#8

This whole _Generic stuff is a mistake. There is already a descendant dialect of C which has nice overloading, namely C++. Analogy: imagine some people aren't happy with the new Fortran. Fortran 66 is the best language ever, and the only flavor of Fortran anyone should use ... except: they like a couple of features from Fortran 2008 and Fortran 90. So, they whip out the Fortran 66 standard and fork it to create "Fort…

You comment is a basically a very good example of a strawman argument.

Counterargument that destroys your entire premise: C's revisions( note that revisions are not flavors or separate languages ) don't fork.

Re: Function overloading in C

#9

This whole _Generic stuff is a mistake. There is already a descendant dialect of C which has nice overloading, namely C++. Analogy: imagine some people aren't happy with the new Fortran. Fortran 66 is the best language ever, and the only flavor of Fortran anyone should use ... except: they like a couple of features from Fortran 2008 and Fortran 90. So, they whip out the Fortran 66 standard and fork it to create "Fort…

You didn't have to give that confusing analogy. I'm sure most people will understand your point without it.

Re: Function overloading in C

#10

I don't program in C, but I can understand most of this code; However, I'm not sure where the "function overloading" part comes in or why it's significant. Could someone explain?

This is a good explanation: https://www.reddit.com/r/programming/comments/3en2px/til_you...
Post reply on HN