Simplifying Distributions type hierarchy

I think that the current approach comes from the early days of Julia when users were still exploring the language — most importantly, before traits were widely used. I have said this before in a previous discussion we had:

I agree with @mohamed82008 that a rewrite would be best to demo a simpler setup. I would recommend much less inheritance and parameterization at the API level, and suggest traits instead (inheritance and type parameters could still be used to implement a lot of functionality where they make sense). This could start as a PR, and depending on the reception it could either be merged or become Distributions2.

6 Likes