Boing Boing Staging

Objectivist C: a selfish programming language

Objectivist C: a programming language wherein each object “must live for its own sake, neither sacrificing itself to others nor sacrificing others to itself.”

@implementation HelloWorld - (void)printHelloWorld { NSString *hello = @"I am. I think. I will."; Printer *printer = [[Printer alloc] init]; if (printer) { [printer print:hello inExchangeForUSDollars:2.00]; [printer release]; } else { // In Objectivist-C, objects are self-sufficient. // Here, I implement string printing from scratch. [self createTheUniverse]; [self createStandardOutputDevice]; [self print:hello]; } } // ...

An Introduction to Objectivist-C

(via O’Reilly Radar)

Exit mobile version