Skip to content

Instantly share code, notes, and snippets.

@lukhnos
Created March 15, 2011 04:52
Show Gist options
  • Save lukhnos/870330 to your computer and use it in GitHub Desktop.
Save lukhnos/870330 to your computer and use it in GitHub Desktop.
The original Objective-C as shown in Brad Cox's book "Object-Oriented Programming: An Evolutionary Approach" (1986). Note the differences from the present-day version.
// Dependency graph
#include "objc.h"
extern id Node;
= Graph:Set { }
// Add a new node
- addNode:(STR)aCharPointer
{ return [self filter:[Node str:aCharPointer]]; }
// Add a new node and define it
- defineNode:(STR)aCharPointer
{ return [[self addNode:aCharPointer] define]; }
// Mark the given node )and all nodes referenced by it)
- mark:(STR)aNodeName
{ return [[self addNode:aNodeName] mark]; }
=;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment