liveBook · Manning

Name collision

Also called naming collision

A name collision occurs when distinct entities use the same identifier within a shared naming scope, creating ambiguity or conflict.

How 3 Manning books explain it

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.

Read how Modern C, Third Edition explains name collision →

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.

Read how React in Depth explains name collision →

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.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains name collision →

Also covered in

What to know first

Related concepts

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.