4 ms·
> That’s why all of its API identifiers have the prefix `Ns_` (or `NS_` or `ns`, depending on the kind of identifier). Kind of like how (coincidentally) Apple’s
by Paul-Craft 4y ago
> That’s why all of its API identifiers have the prefix `Ns_` (or `NS_` or `ns`, depending on the kind of identifier). Kind of like how (coincidentally) Apple’s Foundation and AppKit frameworks use the prefix `NS`, because those came from Nextstep.
I've always hated when APIs and types are prefixed like this. It doesn't play very well with autocompete.
- Macha 4y agoIt largely came about at a time where autocomplete was not a widespread concern but C's lack of namespaces was.
- Paul-Craft 4y agoTell that to the company I worked for 5 years ago. People are still doing it for some reason.
- viraptor 4y agoIt makes sense in C, doesn't it? You want your or some library's string abstraction available separately and not a bunch of errors because you both defined a different `struct string`.
- Paul-Craft 4y agoWe didn't use C.