95 points · by xgdgsc · 3y ago · 33 comments
I wonder how capable the ahead-of-time compiler would be, if you have not just the library, but can also provide the “inputs” in your “script” (that it can specialize on).
This looks like a good series of blog posts on this topic: https://eli.thegreenplace.net/tag/multiple-dispatch
Myself, I was excited to work in a language with multiple dispatch at first, but once I spent some time working full-time in Julia the sheen wore off. It could be Julia's take on it, but I really don't like the kind of ... semantic overloading ... and duck typing that can happen all over the place.
Programs can become very hard to reason about.
I enjoy https://tratt.net/laurie/research/pubs/html/tratt__dynamical... as a discussion of dynamic typing.
Most of the time I am the one wrong.
@descend madness()
would be a pretty good reference to the original text!Positive: it would also let people know at a glance that things like `rand() > 0.5 ? Int64 : Float64` are indeed madness.
Potential negative: some people may not consider it super DEI-friendly? As a neurodivergent person, I'd just find it to be just a lovely reference though.
`@code_warntype` and `Cthulhu.@descend` can both show `SomePackage.foo` was inferred as `Any`. But why? Cthulhu lets you immediately descend, and see that it's because it calls `SomeOtherPackage.bar`, so you descend, and see...
Five or ten calls in, you finally see a problem you can fix that can motivate a PR. This is fast to do with with `Cthulhu`. Descending is as easy as pressing `[enter]`, instead of requiring you to construct all the arguments and descend.
Exploring the call graph while doing this gives you some overview of what the code is doing, and you can always look for the initial cause of propagating instabilities, instead of wading through a ton of JET output (but JET is also great).
Is this built into the existing VSCode extension, or as another extension you need to install?
Update: I just saw that the last release is from 2023-08-31, so I guess it's been updating automatically.