SPLASH 2011: Kresten Thorup - Erlang, Erjang, and Building Reliable Systems

Play SPLASH 2011: Kresten Thorup - Erlang, Erjang, and Building Reliable Systems

The Discussion

  • User profile image

    Humm, I was quite shocking that he gets several points totally wrong about Objective C.

    - First this one: "They are just barely getting garbage collection in there..."

    Garbage collection was introduced to the language in 2006, yes 2006. Let me see, we are 2011, so five years ago and he is saying us that "they are just barely getting garage collection"? Just a pity that there is no one in front of him who can correct that..... Now, garbage collection is not supported in the mobile space (iPhone, iPad and iPod touch) but I believe it makes sense since garbage collection is just too slow and resource consuming to make any sense on a mobile platform. Right now there is a new model which was introduced to the language recently and it's Automatic Reference Counting. See below.

    - "There is still this weird reference counting....".

    Yes reference counting has always been supported by the language for compatibility and for performance reasons even when garbage collection was introduced in the language. Performance driven applications on computers could not just use garbage collection because it did not fit well with performance sensitive applications. Reference counting was surely a "old way" to manage objects memory but it was super fast and that's why Objective C always has been a fast language. And as I said, garbage collection was not supported on the mobile space because it does not fit well with the constrain of resources in the mobile space. So instead of trying to fit garbage collection to the mobile space, Apple introduced a new mechanism which is quite clever. They introduced an Automatic Reference Counting (ARC) so that their compiler (Clang) is now in charge to manage the allocation and release of objects. This is supported on both iOS and Mac OS X, and the need for developers to use reference counting is gone, just gone. The compiler will do the hard work for them. So the developers get the benefits of not having to take care of manually managing their memory but they also don't pay any performance penalty since ARC is fast. There is no runtime garbage collection. At compile time, the compiler will insert the appropriate code for allocation and release as a developer would do manually with reference counting. So I am quite surprised that he does not say anything about that. Maybe he is not up to date about the evolution of the language, but then he should not comment on it. And I don't understand what "issues of memory models" he is talking about since he is quite missing the recent evolution of the languaget.

    - "It's really amazing that old language managed to become so popular now..."

    Old? Objective C as any language has evolved a lot, saying that is old makes little sense. Fortran is more than 60 years old, but it is sill the main language in scientific code. And Fortran has evolved a lot in 60 years too. Now, I believe that Objective C is popular because it is a very good language. It is simple, unique in some aspects, and fast. And it fits quite well for building fast and sophisticated mobile applications.

  • User profile image

    @Hakime: Kresten knows a thing or two about Objective-C. I think it's fair to say that Kresten is a tad more knowledgable in this domain than you presume......

    From http://www.erlang-factory.com/conference/London2011/speakers/KrestenKrabThorup:

    Kresten has been a contributor to several open source projects, including GCC, GNU Objective-C, GNU Compiled Java, Emacs, and Apache Geronimo/Yoko. Before joining Trifork, Kresten worked at NeXT Software (now acquired by Apple), where he was responsible for the development of the Objective-C tool chain, the debugger, and the runtime system.  Kresten was on the committee for JSR-14 (adding generics to Java) which was closely related to the subject of his Ph.D. thesis. 
    Most recently, Kresten has founded the Erjang open source project (notice the J there), a virtual machine for Erlang running on the Java Virtual Machine.


Add Your 2 Cents