Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Erik Meijer and Gilad Bracha: Dart, Monads, Continuations, and More

Download

Right click “Save as…”

While attending GOTO Aarhus 2012, the great Gilad Bracha stopped by the venue (he wasn't attending or speaking at the conference. He was in Aarhus to do work with the core DART engineering team, who are based there). Erik Meijer was a track owner for the event, so he was wandering around the halls in his trademark tie dyes...

Gilad and Erik. Same place. Same time. A coincidence that demanded an Expert to Expert session. They kindly agreed to be put into the spotlight (literally) for a C9 conversation. Here's what happened...

Giladism #42: "Mathematicians love to explain things backwards."
Giladism #43: "There is a huge role for mathematical abstractions in programming languages. It's just that you have to know when to shut up about them and stop taking them as religion."

Some highlights:

[00:00] State of programming language design today
[05:01] On actors
[08:28] Dart snapshot facility
[34:07] On monads
[42:26] On continuations and when to hide mathematical complexity from users

Tune in. Enjoy.

Huge thanks to Gilad and Erik for this excellent conversation!

Tags:

Follow the Discussion

  • ChrisChris

    This question is for Gilad, specifically.

    I don't agree with Gilda's claim that type based overloading is a useless feature.

    I may be confused or there may be another way to get at this but given that you want to apply one logical operation to several different unrelated types (like save or load) then it appears that type based overloading is the only way to reduce needless duplication such as:
    saveInt( int)
    saveFloat( float)

    replaced with:
    save(int)
    save(float)

    Less duplication and the compiler automatically finds the right answer.

    Furthermore, with c++ traits based programming you can fairly explicitly tell the compile to apply an specific operation given a specific type, which seems like a generalization of type-based function overloading.

    How does a programmer in a typed language deal with the above situation without littering repetition all over their codebase?

  • JohnJohn

    It's like peanut butter and chocolate when those two get together!

  • LiyangLiyang

    @Chris: Type-classes. http://en.wikipedia.org/wiki/Type_class

  • felix9felix9 the cat that walked by itself

    oh, no TypeScript ?

  • CharlesCharles Welcome Change

    @felix9: Not everything has to be about TypeScript.

    C

  • @Chris: An in-practice example of the duplication you're talking about can actually be found in the visitor pattern in the Dart compiler (first 80 lines):

    http://code.google.com/p/dart/source/browse/trunk/dart/lib/compiler/implementation/tree/nodes.dart

    Of course, because it's a dynamic language with optional typing you don't have to mention the type 2 times.

  • felix9felix9 the cat that walked by itself

    @Charles: Yeah of course, and this one is nice, nonetheless. But in those days everybody was wondering about Gilad's opinion on TypeScript, like, Mr. Optional Typing vs. Mr. Strong Typing Smiley 

     

  • CharlesCharles Welcome Change

    @felix9: Ah, yes. This was filmed before the announcement, however...

    C

  • gggggg

    This comment is my guessed reason for not using overloading.

    The form save(int) is not object oriented.
    Instead use:
    - intObject.save()
    - floatObject.save()

    An OO method should be:
    - specific regarding its object (argument).
    Gilad avoids even such specifity in its Newspeak language by having only message passing even within an object; as far as I remember.
    - generic or abstract regarding the (other) arguments.
    The method parameter types indicate the requirements of the method regarding the corresponding arguments.

    Define types lazily based on what you need and not eagerly based on what you think you have or your what your object is.
    I guess this is the point of the Google Go language typesystem as well; but I might be mistaken here too.

  • Since it's not linked in the video description, here's the link to the Hewitt Channel9 video.

  • ChrisChris

    @Liyang
    Type classes are the answer after checking out the wikipedia page.
    C++ traits structs are a more ad-hoc form of type classes,
    Thanks!

    @ggg
    You are off the mark. I stated arbitrary types and you can't add every conceivable operation to every class. You need a way to extend types with arbitrary operations after the types have been created as a third party (not the creator of the types).

    Chris

  • Niklas EkstromNiklas Ekstrom

    Gilad is a very smart man. I think he just changed my outlook on programming languages, somewhat.

    Great interview by Erik too, as always. Thanks Charles.

  • CharlesCharles Welcome Change

    @Niklas Ekstrom: Agreed. Agreed. You're welcome. It's always an honor and pleasure to watch and listen to these guys.

    C

  • Is there a list of Giladisms somewhere ? The two here make me want to know more Wink

  • JedrekJedrek

    Mathematics is a programming language for human brain.
    The main advantage of mathematics is flexibility.

    In mathematics it is possible to express all kinds of ideas in a very compact and flexible way.
    Existing programming languages have to comply with all kind of standards which significantly limit their flexibility and possible use in a human reasoning process.
    Mathematics is a "programming language" specially tuned for the use by humans.
    In mathematics we are constrained only by our imagination.
    Because of that mathematics is going to be the leading language for expressing human ideas in the future even in the world of programming languages.
    It is hard to describe new abstract concepts in for example "c".
    However, I believe that in a long run (many, many years) the future belongs to some kind of artificial reasoning techniques which will be based on some kind of future AI concepts.

  • Firstly, a very entertaining and engaging discussion. Nice work Charles!

    Secondly, as someone who has done a fair bit of Smalltalk, C#, Java and F#, I and can contribute from my experience.

    Smalltalk certainly has the cleanest syntax that  I have seen. It is a pleasure to work in that language (unfortunately it was all but wiped out by Java). It think it is the most stress free language that I can think of.

    Now I work mostly work in F# and I believe that I am better off than when I was working in either Smalltalk (or C# or Java).

    F# (or OCaml) has strong *type inference* so most of the time it does not *feel* that you are working in a strongly typed language. If you make a change, the types automatically propagate through. If there is a type conflict, the error gets flagged and you can fix it.

    While nothing is perfect, F# strikes a good balance between the extremes of Smalltalk and Haskell.

     

     

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.