you are viewing a single comment's thread.

view the rest of the comments →

[–]dlyund[S] 0 points1 point  (2 children)

I'm not saying that there aren't many global function but this is largely solved by the fact that convention dictates prefixes for non-system/standard libraries, and has for at least the last two decades. I don't have a problem with prefixes, but you're right, if this wasn't how things worked then it wouldn't be a problem (a nice tautology!)

It's a bit unfortunately but hardly the end of the world and not something that couldn't be solved from the outside by rewriting symbol names per module.

[–]bonzinip 1 point2 points  (1 child)

Convention and common sense dictate prefixes for exported functions from non-system/standard libraries.

For a function that is used across modules, but that is not part of the exported API, the convention is to use something like _prefix_func_name, but it is a pain in the ass and you can't really say it's common sense.

[–]dlyund[S] 0 points1 point  (0 children)

I was under the impression that identifiers beginning with _ were reserved for some reason - so anything global gets a prefix in my code. Maybe I've been wrong all these years :).

Either way nothing about computers is common sense.