Designing APIs. defining new methods versus passing in functions

Re-using the memory. I’m not trying to get too into the weeds on this, just making the point that simple wrapper types used just for dispatch behavior are often zero-overhead, but I even so they’re often not the right API choice if there’s something simpler available. Julia’s type system is very expressive, I often get nerd-sniped into using it even when there’s a more direct way.

1 Like