E2E: Erik Meijer and Robert Griesemer - Going Go

Sign in to queue

Description

At Lang.NEXT 2012, several conversations happened in the "social room", which was right next to the room where sessions took place. Our dear friend, Erik Meijer, led many interesting conversations, some of which we are fortunate enough to have caught on camera for C9.

Here, Erik interviews Go language designer Robert Griesemer. Go is a concurrent, garbage-collected systems programming language with fast compilation. See Robert's Lang.NEXT 2012 Go presentation.

Topics in this E2E conversation include:

Is Go native? What is native, exactly? Why Go?

Tune in.

Thank you Robert and Erik for the fascinating conversation.

Embed

Download

Download this episode

The Discussion

  • User profile image
    felix9

    Very interesting ! Go Go Go

  • User profile image
    Zura

    Thanks for the interesting talk!

    I have a question. Instead of using defer:

    f, _ := os.Open("somefile")
    defer f.Close()

    Why not just have special method, like C++'s destructor, which is fired automatically at the end of scope? You can still handle the plain memory in the GC, but the destructor will handle other resources. What is the principal difference between calling Close() in the destructor vs defer-ing Close()?

    Thanks,
    Zura

  • User profile image
    mvrak

    Zura: In Go, the file handle could have been passed a long a channel to somewhere else. Keeping the call of the "destructor" in a defer statement also increases clarity.

    There are many compromises between clarity, garbage collection, and general feature sets. Go is heavily biased towards clarity.

  • User profile image
    mvrak

    Note that SetFinalizer exists, which is essentially a destructor triggered by the Garbage Collector. http://golang.org/pkg/runtime/#SetFinalizer

  • User profile image
    Brecht

    Note that SetFinalizer is not guaranteed to run.

  • User profile image
    Zura

    @mvrak:
    The finalizer is called by GC, i.e. it is nondeterministic, it might not be called until the end of program.
    The defer-ed function is called at the end of the function.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.