Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Re: "You can declare a function static if you only want it visible in a single source file."

Static means different things in different languages, and in C in different places.

In what sense is a static C function static/unmoveable? or a static / class variable static in Java?

I find a lot of programming language guides tell you what without a coherent why.



It’s static as it will always resolve to the same function. An extern function depends on whatever you link against (or users link against if you provide a static library).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: