Good videos, with context.
The Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski | JuliaCon 2019

The Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski | JuliaCon 2019

The Julia Programming Language
9 HN recommenders · discussed 2019–2025
Open YouTube ↗

About this video

Julia co-creator Stefan Karpinski explains why multiple dispatch makes Julia code and types reusable across packages with so little friction. He covers sharing basic types and sharing generic algorithms.

Why it appears in the archive

HN commenters recommend it as the definitive explanation, from a language designer, of why multiple dispatch makes Julia's composability work.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

dTal · 2020-06 · strong rec

Did you mean "unreasonable effectiveness"? :P I just watched that talk the other day, and boy is it insightful. Julia has cracked a fairly magical combination of features. I fully expect it to replace Python over the next 10 years. Direct link to "Unreasonable Effectiveness": [VIDEO]

Read original comment ↗
ddragon · 2020-05 · rec

It's hard to say limited benefit when the entire Julia ecosystem evolved to so heavily rely on it, to allow for each package to work on it's own level of abstraction: For example, the Julia's standard library implements all of the basic math operators on the CPU, and libraries like Flux then define it's own methods to implement the higher level operators used in ML (such as convolutional layers and activation functions). And then someone writes those same basic math operators but instead of running on CPU they run on GPU, and for that they use a new type (CUArray). The original library knows nothing about CUArrays, it will call the same basic operators as always, but since they have a different type (received from the user) they'll dispatch to the GPU version. This kind of interaction can grow indefinitely, for example if you use a complex number type/library it will change the basic operators to deal with both real and imaginary parts, and if you use the GPU types within it, then it will do complex math in the GPU (and ML on complex math on GPU..., without any of the libraries being aware of the other). You can see a more detailed explanation on: [VIDEO]

Read original comment ↗
ssivark · 2020-07 · rec

You might also enjoy Stefan Karpinski’s talk at JuliaCon 2019 about how multiple dispatch helps make the language more expressive (than OOP, for Eg). The unreasonable effectiveness of multiple dispatch [VIDEO] It seems like such an elegant idea, I’m somewhat surprised no one seems to have run with it earlier.

Read original comment ↗
nur0n · 2020-10 · rec

I like to watch talks by programming language designers. Some that readily come to mind are Rich Hickey, Joe Armstrong (RIP), and Stefan Karpinski. Some of my favorites are: - Simple Made Easy (Hickey): [LINK] - The Mess We're In (Armstrong): [LINK] - The Unreasonable Effectiveness of Multiple Dispatch (Karpinski): [VIDEO]

Read original comment ↗
StefanKarpinski · 2020-10 · rec

The core problem with class-based object orientation is that methods go inside of the type instead of being added externally. That means everyone has to agree on what methods can be called on a class or they have to subtype it, which sounds harmless, but is actually a big problem when what you really wanted to do was just define a new method for an existing type. My best attempt at explaining: [VIDEO] There's also the issue that one sometimes needs to specialize generic operations in generic algorithms on something other than the receiver—sometimes even on more than one of the arguments. Single dispatch forces you to use something slow and awkward like double dispatch in cases like this. And that's assuming the person who wrote the generic code anticipates the need for specialization! If they don't allow for it, then you're just stuck. With multiple dispatch, you can just define the method you need the specialization for and you're done.

Read original comment ↗
amkkma · 2020-10 · rec

What? I used to write python, and to me, MD is first and foremost a conceptual improvement. Makes writing code so much sweeter, more expressive and sensical. It also heavily improves composability. It's LESS performant if not done carefully. Certainly FastAI, Matt rocklin etc didn't reimplement a subset in python just to get slower code See [VIDEO]

Read original comment ↗
stabbles · 2020-10 · rec

"The Unreasonable Effectiveness of X" is a reference to the well-known 'the unreasonable effectiveness of mathematics in the natural sciences'. It's turned into some sort of meme. Maybe you've seen 'the unreasonable effectiveness of recurrent neural networks' before. What you were referring to is a talk by a core developer at JuliaCon 2019 titled 'The unreasonable effectiveness of multiple dispatch' [1], which has less of a fanboy-vibe imho. Edit: Oh. I didn't notice the arstechnica article had this exact title. That's a bit cheap... [1] [VIDEO]

Read original comment ↗
dandanua · 2021-01 · rec

Indeed, Julia's abstract type system with multiple dispatch is its killer feature. It enables generic programming in a beautiful and concise fashion. Here [1] Stefan Karpinski gives some explanations of why multiple dispatch is so effective. [1] [VIDEO]

Read original comment ↗