Name collision
A name collision occurs when distinct entities use the same identifier within a shared naming scope, creating ambiguity or conflict.
Modern C, Third Edition
A naming conflict is an unintended collision between names declared by different parts of a C program, library, implementation, or macro environment.
- How it is used
- Prevents application, library, implementation, and macro names from interfering across interfaces.
- How deep it goes
- Explains reserved names, exposure boundaries, prefixes, and macro-sensitive members and parameters, without detailing compiler name-resolution internals.
- Examples
- Uses prefixed and unprefixed function signatures plus examples of identifiers that are recognizable or difficult to distinguish.
- What you can do after
- Apply naming prefixes and limited API exposure to reduce collisions in C libraries and shared code.
React in Depth
- How it is used
- Frames CSS class-name collisions as a scaling risk when styling React components with ordinary CSS files.
- How deep it goes
- Explains global CSS collisions and their effects, but offers no implementation beyond naming schemes such as BEM.
- Examples
- Uses `.wrapper` and `.group` rules, including collisions between an embedded React app and a website.
- What you can do after
- Diagnose unintended cross-component styles caused by reused CSS class names.
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
An accidental conflict caused when distinct identifiers or values are mistaken for one another or map to the same name.
- How it is used
- Prevents unrelated flags from being mistaken for one another when functions or handlers identify actions by value.
- How deep it goes
- Explains the flag-confusion scenario and Symbol uniqueness, without detailing broader symbol behavior.
- Examples
- Uses tooltip position flags that accidentally match answer flags, then contrasts repeated Symbol descriptions.
- What you can do after
- Apply Symbol() to create unique flags that avoid accidental matches.
Also covered in
What to know first
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- stringA string is a programming-language value representing textual data as an ordered sequence of characters or encoded units.
Related concepts
- namespaceaddressed by · A global namespace is a top-level naming context that binds identifiers defined at the outermost level and distinguishes them from names in nested scopes.
- import aliasaddressed by · An import alias is an alternate name bound to an imported module, namespace, or other imported program element for use in source code.
- symboladdressed by · A symbol is a name or sign that represents or identifies a value, entity, operation, or concept within a notation or system.
- BEMaddressed by · BEM, or Block-Element-Modifier, is a CSS naming methodology that organizes classes around reusable blocks, their elements, and their modifiers.
- CSS scopeaddressed by · CSS scope is a language feature that limits style rules to elements within a specified region of a document.
Questions about name collision
What is name collision?
A name collision occurs when distinct entities use the same identifier within a shared naming scope, creating ambiguity or conflict.
Which Manning books explain name collision?
Modern C, Third Edition, React in Depth and Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond.
What should I know before learning name collision?
Manning books that teach name collision usually introduce CSS, HTML and string first.
What is name collision also called?
Name collision is also called naming collision.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


