Very good talk, deep and entertaining at the same time. Should be more popular.
@OndrejPopp
5 жыл бұрын
I am looking at some videos about type inference, to learn more about it. In this presentation it was cool to see how type parameters can be automatically derived. However, concerning statically typed languages, is having to write types explicitly really such a bad thing? For example if you would have a function like this, allocatePresentation(Title t, Speaker s, Room r, TimeSlot ts), then after eliminating the type information you would end up with allocatePresentation (t, s, r, ts) which is completely unreadable, so you would probably write this as, allocatePresentation (Title, Speaker, Room, TimeSlot) which is much more readable. So actually what has happened is that the type names have been converted into parameter names, for the sake of readability, which gives you no gain concerning the amount of characters you have to type. Even worse, now the parameter names got bigger, each parameter reference in the function body will also amount to more typing, so each instance of t is replaced by Title and so on. So in the end this amounts to more typing than with statically typed languages, where you specify a type name only once in the parameter declaration and can then use shorter names for each parameter reference, and similar. And so, realizing this, there is a certain amount of information that gets preserved for the sake of readability, and so the self documenting property of statically typed languages, by means of explicit types, is not always a bad thing and maybe its not always "laziness" that motivates this. Nevertheless, type inference is cool...
@lyn200q
11 ай бұрын
Exactly what I thought. After having experience with c++ auto keyword, I think, explicit typing is always good and also it is a must as far as maintenance is considered. It is no longer an issue with the use of IDE.
@OndrejPopp
11 ай бұрын
@lyn200q Hi 👋 had to re-read my comment from 4 years ago, so now I remember what I wrote over here. But, concerning your bad experience with the auto keyword, I use that, mostly to avoid typing such as std::map m = getTags(); But it kind of depends, sometimes I write it out just to make clear what the type is, and sometimes I use auto, especially in range for loops 🙂
@faisalwaris1919
10 жыл бұрын
Should mentioned that F# (.Net / Mono) also has Hindley-Milner type inference. F# is from the ML family
@tomdahulk
8 жыл бұрын
Does anyone know who this speaker is? I was really intrigued by his presentation and would like to see more from him!
@leonhrad
8 жыл бұрын
+Swingtheory that's Daniel Spiewak
@klaasvanschelven769
7 жыл бұрын
The speaker is Daniel Spiewak according to the opening slide
@AlexBerg1
6 жыл бұрын
His "selfish purity" talk is great. 👍
@kwangyulseo4305
10 жыл бұрын
PDF link: chariotsolutions.com/presentation/uncovering-the-unknown-principles-of-type-inference/
@vadiethestar
12 жыл бұрын
This is type theory!! that was hilarious.
@HAAAAAA614
Ай бұрын
LOL WHAT? 6 Did he really say putting types in code is pointless because we only care about the runtime? Spoken like someone that has never had to work on a software written by dozens of people over a span of 20 years. I should not have to do any mental gymnastics to know what a type of something is when the type can ideally be shown right there. Why add more cognitive load? He called the language designers lazy? Seems like he's the lazy one for not taking the time to write code that'll be understandable to people that are not him A lot of computer science theory is appealing on paper and to talk about, but in real life software, in actually implementing it, the simpler and straightforward something is, the better it is to integrate with other people. Recursive decent parsers are probably the most widely used parsers, but from a theoretical point of view, there are better and faster parsers. But recursive decent is easier to reason about. The fact that functional bros always take a jab at OOP or non functional languages is always funny to me. It's even more funnier when they don't understand why functional programming isn't more main stream. If you guys took your non math/computer sciences courses seriously, you'd see why, easily. It's easy to shit talk about non functional languages because not enough people use functional languages to make noise about its shitty features lol 10/10 talk though. Just shit opinions
Пікірлер: 12