Features Podcasts Family Video Comics Music Tech Science Books Film & TV Games ✚

Jill

Objectivist C: a selfish programming language

Cory Doctorow at 3:08 pm Tue, May 22, 2012

— FEATURED —

Science

Last chance to enter the Armchair Taxonomist challenge!

Book Review

Black Code: how spies, cops and crims are making cyberspace unfit for human habitation

Book Review

We Can Fix it! - a graphic novel time travel memoir

Science

The technology that links taxonomy and Star Trek

— FOLLOW US —

Boing Boing is on Twitter and Facebook. Subscribe to our RSS feed or daily email.

 

— POLICIES —

Except where indicated, Boing Boing is licensed under a Creative Commons License permitting non-commercial sharing with attribution

 

— FONTS —

Tweet
Kindle

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)

I write books. My latest is a YA science fiction novel called Homeland (it's the sequel to Little Brother). More books: Rapture of the Nerds (a novel, with Charlie Stross); With a Little Help (short stories); and The Great Big Beautiful Tomorrow (novella and nonfic). I speak all over the place and I tweet and tumble, too.

MORE:  computer science • Funny • happy mutants • politics

More at Boing Boing

The technology that links taxonomy and Star Trek

Hackers prepare for first "national holiday" in their honor

  • leroybrown

    Yeah, and no “getting started” guides, just people screaming “LEARN TO FISH, MOTHERFUCKER!!” 

    • wysinwyg

      It’s pronounced “arr tee eff emm”.

      • leroybrown

        That’s way too passive aggressive, Objectivists have perfected the art of active aggression.

  • Purplecat

    Also, in this implementation, you cannot create an object to hold other objects  of various types, because unions are a communist concept.

  • chellberty

    Surprisingly complex i would have supposed it would just have said I’ve got mine jack  in brackets Ad infinitum

  • Alan Olsen

    Garbage collection in this language does not occur except at great expense.  It does have a lot of references to “self” however.

    • Dave Lloyd

      Garbage collection is unnecessary as there is infinite potential for growth.

    • gibbon1

      Garbage collection interferes with the operation of the free market.  Memory is either bought or leased from it’s rightful owners.

  • http://www.facebook.com/people/Louis-Brown/100000890178471 Louis Brown

    Seems prone to codebloat particularly at the end as it must explain it’s design philosophy in excruciating detail, ie hundreds of pages worth of soapboxing.

  • mistercat

    It’s also damn hard to make aggregates. self.owner is always null, and self.children should be set to null as quickly as possible because they’re PARASITES.

  • http://profiles.yahoo.com/u/42THFKXIPMJHQBIH6OPI4RVIDY Thebes

    “Objectivists”, like any other religious group, believe that they have the One True world view, that only they can see things as they really are- that only they know Objective Truth.

    Its not a philosophy, its a religion based upon being a douchebag.

    • http://www.plan8.tv Roanhouse

      its an excuse to not care and to be a dick to everyone. Basically rationalized psychopathy

  • Fnordius

    There are no reported sightings of this, for various mysterious reasons. Either resources weren’t shared, resulting in a collapse of logic or self-sufficient instances would cease communication, other than sending out missives extolling its virtues.

    My one attempt in my misspent youth in using this ended up bricking my Commodore. In hindsight, it probably just refused to talk to me without knowing what was in it for itself.

  • Doomstalk

    Is a man not entitled to the sweat of his brow? “No!” says the man in Cupertino.

  • Robert Cruickshank

    Someone should get this running on a UNIVAC for a full win.

  • RayCornwall

    Can we get a user manual drawn by Steve Ditko?