Name collision

Name collision

The term "name collision" refers to the nomenclature problem that occurs in computer programs when the same variable name is used for different things in two separate areas that are joined, merged, or otherwise share the same namespace. [1] Problems of name collision, and methods to avoid them, are a common issue in an introductory level analysis of computer languages, such as for C++.[1]

Contents


History

The term "name collision" has been used in computer science for more than 3 decades, when referring to names in various classification systems.[2]

Avoiding name collisions

There are several techniques for avoiding name collisions, including the use of:

  • namespaces - to qualify each name within a separate name group, so that the totally qualified names differ from each other.[1]
  • renaming - to change the name of one item (typically the one used less often) into some other name.
  • prefixing - putting unique characters before the names so that the names differ and further name collisions are unlikely to happen by accident.

Those are some of the tactics used to resolve the name collisions.

See also

  • local variables, variable data items that are local to a module
  • nominative selection, the term in linguistics for selecting items by name

References

  1. ^ a b c "Getting Started" (lesson for C++), Brown University, Computer Science Dept., January 2000 (in text as "Jan 2000"), pages 5-6, webpage (PDF): CS-Brown-Cpp.
  2. ^ "Name collision in multiple classification hierarchies", Portal ACM (Association for Computing Machinery), by J.L. Knudsen, 1988, webpage: Portal-ACM-607.



Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • name collision — vardų konfliktas statusas T sritis informatika apibrėžtis Situacija, kai atsiranda du vienodi ↑vardai (1) toje pačioje ↑galiojimo srityje. Pavyzdžiui, kai failą bandoma perkelti į katalogą, kuriame tokiu vardu pavadintas failas jau yra. Sistema… …   Enciklopedinis kompiuterijos žodynas

  • Collision (N.Z. compilation album) — Infobox Album Name = Collision Type = Album Artist = Various Background = darkseagreen Released = 1993 Recorded = Genre = Length = Label = White Music Producer = Reviews = Last album = This album = Collision (1993) Next album = Collision is a… …   Wikipedia

  • Collision Course... Paradox 2 (Royal Hunt album) — Infobox Album | Name = Collision Course... Paradox II Type = Album Artist = Royal Hunt Background = Released = 2008 Recorded = Genre = Hard rock Producer = André Andersen Last album = Paper blood (2005) This album = Collision Course... Paradox II …   Wikipedia

  • name conflict — vardų konfliktas statusas T sritis informatika apibrėžtis Situacija, kai atsiranda du vienodi ↑vardai (1) toje pačioje ↑galiojimo srityje. Pavyzdžiui, kai failą bandoma perkelti į katalogą, kuriame tokiu vardu pavadintas failas jau yra. Sistema… …   Enciklopedinis kompiuterijos žodynas

  • Collision Course (album) — Collision Course EP by Jay Z and Linkin Park Released November 30 …   Wikipedia

  • Collision (Lost) — Collision Lost episode Ana Lucia decides what to do. Episode no …   Wikipedia

  • Collision Course (Space: 1999) — Collision Course Space: 1999 episode Episode no. Season 1 Episode 13 Directed by Ray Austin Written by …   Wikipedia

  • Collision (Heroes) — Collision Heroes episode A messenger from the future has a message for Peter …   Wikipedia

  • Collision/reaction cell — A collision/reaction cell is a device used in inductively coupled plasma mass spectrometry to remove interfering ions through ion/neutral reactions.[1] Contents 1 Dynamic reaction cell 2 Collisional reaction interface (CRI) …   Wikipedia

  • Collision Insurance — A type of auto insurance coverage. Collision Insurance will reimburse the insured for any damage sustained to their personal automobile that is due to the fault of the insured driver. This type of insurance is often added as an extension of a… …   Investment dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”