Lang.NEXT 2012 Expert Panel: Web and Cloud Programming (and more)
- Date: April 2, 2012 from 2:00PM to 3:20PM
- Day 1
- Speakers: Peter Alvaro, Gilad Bracha, Anders Hejlsberg, Erik Meijer, Martin Odersky
- 33,669 Views
- 26 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
What happens when Anders Hejlsberg, Gilad Bracha, Martin Odersky, and Peter Alvaro get together for an interactive panel moderated by Erik Meijer?
Tune in. ![]()
Already have a Channel 9 account? Please sign in
Follow the Discussion
Is there a recording for this? It'd be stellar to have it.
Yes, there is (for all of the sessions you see posted, in fact). Unfortunately, in this case, the maxed out audio signal was too over the top when Erik screamed
So, we are spending more time trying to figure out how to protect the eardrums of users... Almost there...
Stay tuned.
C
My eardrums can take it, please post
@AceHack: We will post. Have no fear.
C
Well, I used to be a fan of Heavy-Metal bands, so ......
So worth the wait. I vote best video of channel 9 all time. Wish there was a 10 star button.
It's very strange that this panel didn't mentioned F# at all.
Martin said completely wrong thing that only Scala has functional data collections. F# has functional data structures from the inception and it is one of the Visual Studio official languages supported (supposedly) by Microsoft. Is it only my impression or MS should promote F# a little bit more if it's not going to drop its support?
@Petr: Haskell, Ocaml, ml etc have functional datastructures as well but they don't apply the uniform return type principle in their collections.
In Scala the type of 'result' will be a Set[Int], in F# & C# it will be an IEnumerable. Scala is one of the few languages that has a type system that is powerfull enaugh to allow this trickery.
Of course Scala can have behave similarly as F# or C# if you want it to (aSet.iterator.filter... )
A more powerfull example:
http://www.scala-lang.org/docu/files/collections-api/collections_2.html
F# set operations also return sets :
let set = Set([1; 2; 3])
let filtered = set |> Set.filter (fun elm -> elm = 2)
let mapped = set |> Set.map (fun elm -> elm.ToString() )
>
val set : Set<int> = set [1; 2; 3]
val filtered : Set<int> = set [2]
val mapped : Set<string> = set ["1"; "2"; "3"]
@Petr: You use Set.filter, that's cheating, can you write
let filtered = set |> filter (fun elm -> elm = 2)?
(you can in Haskell, but I don't think F# has type classes or type constructors)
In scala filter is implemented once, for all collections (of course some collections override & specialize for performance), it still supports the uniform return type principle and you don't need to tell it specifically what function it has to call.
In F# you have to reïmplement filter for all collections and then you still can't handle my last example with strings.
@llemieng: I wouldn't said its cheacting.
From the point of view of lang user it's just little syntactic difference:) It is difference in internal library implementation. Scala has type classes but only because JVM types erasure which results to worse runtime performance and lacking type inference. F# have no type classes but it has excellent type inference and it's strict type system leads to virtually bug free applications.
But we are going to start holy war here, arn't we :)
My point is that F# HAS functional data collections and I can hardy believe that MS hosted conference discussing modern languages managed to avoid mention F# in any panel discussions.
P.S. Your string example:
let aString = "string"
let stringResult = aString |> Seq.map (fun c -> Char.ToUpper(c))
let listResult = aString |> Seq.map(fun c -> int c)
@Petr:
let aString = "string"
let stringResult = aString |> Seq.map (fun c -> Char.ToUpper(c)) // returns seq<char>, not String, not expected
let listResult = aString |> Seq.map(fun c -> int c) // returns seq<int> as expected
And in both cases you specifically had to point out the function that F# uses and you lost type information in the first case.
I don't agree with your comments on erasure & type classes. The reified types wouldn't help Scala one bit to achieve their collection library. (I'm not saying that reified types aren't usefull, just that they don't help here)
And I see now that by functional datastructures, they mean efficient persistent datastructures. So, does F# have datastructures (Lists, Sets, Maps) that are immutable and have a very efficient (close to O(1)) update and delete operations?
@llemieng: Yes, F# has efficient immutable List, Set and Map datatypes.
About string sample. If I want map string to string I can use String.map function.
let aString |> String.map (fun c -> Char.ToUpper(c))
In .NET string type is a sequence of characters. I'm not sure that I want mapping operation on string implicitely transform it to array for me :)
Excellent. Press play on video...
The F# examples are not as idiomatic as they could be.
Example 1:
Example 2:
A little bit of the "Intellisense effortlessness" is lost of course, because you're not dotting your way through functions but instead tell the compiler that it should use the filter function from the Set module, etc.
The |> pipeline operator does ensure that you can use the same fluent style though.
Great panel - interesting and funny throughout. The last question really has to make you wonder …
. I'll try to make it in person next time.
Thanks for making this panel discussion available, great stuff and funny, it made me laugh out loud multiple times.
It was indeed very humorous.
Good points about the skill of the library writer vs the skill of the application writer vs the application writer as a library writer.
I do wonder what Anders meant with machine learning and its future in programming.
@Petr:I think Microsoft is still uncertain what to do with F#. Microsoft does not even promote it as a Windows 8 development language.
@Moondevil: Yes, it seems you're right and this is very sad
@exoteric: Check out this session, where he mentions what Anders said there, how most people don't know what to do with machine learning in terms of language design, yet:
http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Reverend-Bayes-meet-Countess-Lovelace-Probabilistic-Programming-for-Machine-Learning
It's funny, he mentions Anders and esoteric in the same paragraph ... oh your exo ... still.
(I am actually also esoteric
, I just don't use that account anymore for technical reasons.)
Thanks for the reference. I'll check it out!
Very interesting and funny (it's always funny with Gilad).
Did I understand it right: Anders will be mainly occupied with JavaScript in the next years ? Will he work an a competitor to Dart ? And what happens with C# (who will be the chief architect ?) I don't expect an answer here but I'm nontheless curious.
Fascinating discussion
Yes interesting...
I agree. In F# you can write same kind of code inside and outside a monad (="computational expression") where e.g. in C# you have to move from old imperative ("normal") code to LINQ-syntax.
Today, I went to the beachfront with my kids. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!
I'm truly enjoying the design and layout of your website. It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work!
Remove this comment
Remove this thread
close