The Unreasonable Efficiency and Effectiveness of Multiple Dispatch: Your Favourite Examples

I don’t agree with this statement, in the sense that I don’t agree that the evidence is purely anecdotal. As I mentioned in the slack discussion, the majority of the cited YouTube talk is factual.

I created a short self-contained example to showcase Julia’s composability. It composes reals, duals, symbolics, diffeq, monte-carlo measurements, matrices, and trigonometrics. I created this based on other people’s work (Stefan’s talk, Kristoffer and Fredrerik’s presentation, Frames’ blogpost, and other resources). It is the first section of this notebook:

I am very happy with this example, because it is purely factual, and very much up to date, and even includes symbolic stuff which is currently cutting edge in Julia.

As I discussed at the end of the first section of that notebook, this absolutely crazy composability example is simply, and factually, impossible in Python, because there is no single sin function. There is numpy.sin, sympy.sin, etc. etc… Any Python developer would have to write glue code to create in Python what is possible in Julia out-of-the-box.

Let me also say, anecdotally ( :wink: ) that one day I saw my wife’s code (Python user) and my eye glanced over a statement import jax.numpy, which made me start laughing because I realized that JAX had to re-implement (at least partially) numpy, which is arguably Python’s largest library.

8 Likes