Questions tagged [namespaces]

For questions relating to namespaces. Namespaces prevent name collision between different identifiers with the same name.

Filter by
Sorted by
Tagged with
5 votes
3 answers

Types and variables in a different namespace

What would it take to design a language that permitted construct such as below? int int = 10; Such a language would need to be able to infer contextually whether a ...
user16217248's user avatar
  • 7,525
10 votes
1 answer

What are the advantages to placing functions in a separate namespace?

In many modern languages, a function is just a specific kind of value that happens to be callable. However, some languages, even if they support first-class functions, assign functions to their own ...
Silvio Mayolo's user avatar
8 votes
3 answers

What are some approaches to namespacing?

Objective-C didn't have namespaces, so everyone chose a two- or three-letter prefix to stick on everything. This has effects to this day as typenames like NSObject ...
Bbrk24's user avatar
  • 8,847