A term coined by Sigmund Freud to describe the primal aspects of human thoughts and emotions. According to Freud, the id is the source of one's inclinations toward sexuality, violence, irrationalities and fantasies.

Also short for identification. An example of this is a driver's license. If you try to buy alcohol or tobacco, the vendor may ask to see your ID for proof of legal age.

Also an Objective C typedef for storing object pointers.

In Objective C, id is defined as (NSObject *)-- literally, a pointer to an object.

Objective C is nifty in that it has a language-sponsored institutional polymorphic base class; all classes inherit from NSObject, which provides a few extremely basic functions like memory allocation and prototypes a number of methods which nearly all objects can be expected to follow, for example init. Between this and the dynamic nature of the language and runtime, Polymorphism becomes extremely flexible and easy to do.

Because all objects of any type are descendents of type NSObject, ANY object in objective c can be treated as having type id. The compiler assumes that any methods or method arguments without explicitly stated return types are of type id (C, by contrast, assumes int), and so you tend to find yourself passing objects around as id whereever at all possible. Of course, if you are going to be using class-specific methods in the passed object then you will pass a more specific class, but in general objective c programmers tend to choose to store objects as the most abstract class possible, resulting in wonderfully flexible code.

This doesn't sound like much on paper, but in practice it is a wonderful, wonderful thing, simply and elegantly serving the purpose of C++ templates without ANY of the hassle. If you are programming in Objective C, the exact type of an object you are manipulating doesn't have to matter; all that matters is how you interact with it. (And if it DOES matter, you can actually check types at runtime with an ordinary if() statement.)

(All of this, keep in mind, excludes base C types-- but that doesn't become a problem, because in Objective C you just don't *use* base C types. Using non-object types while performing object-oriented tasks is simply bad software design, and the Objective C language recognizes this; it encourages you to use objects for object things and non-objects for non-object things, and because the language supports the idea elegantly (Unlike in C++) you never really get the urge to do otherwise (Unlike in C++).)
Two further interesting byproducts of all this:
  • You can add a method to all classes simultaneously, by defining a category to NSObject. This is usually a fairly bad idea unless you REALLY know what you're doing; however, it has its uses. Most notably, this technique is used to create what is called an informal protocol.
  • Because NSObject is defined wholly within the language itself instead of as a "magical" construct, you can write your own polymorphic base class which acts in its own wholly different way, have it conform to the NSObject protocol, and then pass its descendents around masquerading as a real NSObject. This is a REALLY bad idea if you don't know what you're doing, but offers some interesting possibilities.

British film, directed by Phil Davis and released by BBC Films and Parallax Pictures in 1995.

Starring Reece Dinsdale, Sean Pertwee, Warren Clarke and Saskia Reeves.

ID is the story of four police officers sent undercover to infiltrate a notorious gang of football hooligans in the late Eighties. Their brief is to acquire incriminating evidence on the 'ringleaders' of the gang in order to bring the hooligan organisation to its knees.

However, the four soon find themselves deep in an enticing and exhilarating world of football violence, and a love affair with both Shadwell Town FC and the local boozer of its hooligans - The Rock. Falling in with the hardcore of Shadwell's boys, the four soon find their job compromised by personal feelings. As John (Dinsdale) replies to his sergeant Trevor's mention of the team's 'targets' - "Targets, bollocks! These are our mates!" Soon, through John's acts of 'bottle' and the four's constant willingness to mix in when it kicks off, the four are regarded amongst the 'top boys' of the firm - but while three of them are able to keep some perspective on their relationship with Shadwell and its fans, John finds himself becoming more and more a hooligan and less and less a policeman. His transformation into a violent, drug-taking, foul-mouthed animal leads to the break-up of his marriage and his relationship with the landlady of The Rock, Lynda (Reeves).

As John steadily becomes one of the hooligans he's meant to be putting behind bars, he fatally stabs a Tyneburn hooligan in the midst of a pitched battle. His colleagues cover up this crossing of the line but for John, it's too late. As the squad are recalled and their evidence used to close The Rock and put Shadwell's firm out of business, John slumps into a mire of drug addiction, self-loathing and violence. In the poignant closing scene of the film, Trevor is policing a National Front march when he sees John, head shaved and jackbooted. John tells Trevor he is on another undercover operation...but as the film closes we see John is embracing the life of a fascist thug in the same way he did that of a football hooligan...

As a realistic portrayal of football violence and the methods used to combat it in the late Eighties, ID is one of the better efforts. It still falls foul of some football clichés and anachronisms, and the fictional teams (Shadwell, Tyneburn, Wapping and Midchester) sound like something out of a Boys Own football comic, but the world that Davis creates is gritty and realistic nontheless. While Dinsdale plays the part of John with gusto, his over-the-top emotional acting is at times laughable. However, the supporting cast is nothing short of brilliant - Sean Pertwee in particular, playing Martin, the other main hooligan in the Shadwell firm. All the male characters are fleshed out and extremely realistic, and even the supposed 'villains' of the Shadwell firm are likeable sorts. The transition from action thriller to dark character study occurs rather suddenly, but the pacing of the film is great, with brilliantly-directed fight scenes followed by emotionally-draining character acting or laddish black humour.

Id (?), n. Zool.

A small fresh-water cyprinoid fish (Leuciscus idus or Idus idus) of Europe. A domesticated variety, colored like the goldfish, is called orfe in Germany.

 

© Webster 1913.

Log in or registerto write something here or to contact authors.