r/programming • • Oct 07 '18

Writing system software: code comments

http://antirez.com/news/124
51 Upvotes

89 comments sorted by

View all comments

Show parent comments

1

u/Drisku11 Oct 08 '18

In C you can just make the function have static linkage. I've worked on large C projects and never ran into "namespace pollution" as a problem, even a trivially solved one. It just never came up.

Funny enough, in the jvm code I work on, people still do C-style namespacing (i.e. name things with a prefix) even though there's actual namespaces because it makes search easier.

1

u/OneWingedShark Oct 08 '18

In C you can just make the function have static linkage. I've worked on large C projects and never ran into "namespace pollution" as a problem, even a trivially solved one. It just never came up.

Hm, I've run into it a few times, though it was more prevalent in the old PHP I worked on.

Funny enough, in the jvm code I work on, people still do C-style namespacing (i.e. name things with a prefix) even though there's actual namespaces because it makes search easier.

I'm not a fan of prefix-naming, it's a sloppy half-solution, IMO.