Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Normal{P,X} to Normal{X,P} #13

Closed
cscherrer opened this issue Oct 2, 2020 · 4 comments
Closed

Change Normal{P,X} to Normal{X,P} #13

cscherrer opened this issue Oct 2, 2020 · 4 comments

Comments

@cscherrer
Copy link
Collaborator

@phipsgabler suggested this, so users can write, e.g.,

Normal{Float64}

instead of

Normal{P,Float64} where {P}

Any objections @mschauer @simeonschaub @femtomc ?

@cscherrer
Copy link
Collaborator Author

cscherrer commented Oct 2, 2020

To be clear, this is just an example - we need a general pattern for measures that can follow different parameterizations.

One possible counterargument: The current setup makes it a bit easier to talk about generic measure types on X, since we can have e.g.

M{Float64}

and M might be Lebesgue or Normal{P} for some P.

Starting this issue I was "all in", but now I'm back to undecided. What do you think?

@mschauer
Copy link
Member

mschauer commented Oct 2, 2020

in favor, there might be no P at all.

@cscherrer
Copy link
Collaborator Author

in favor, there might be no P at all.

Good point. And e.g. Array{T,N} is a a generalization of Vector{T}, also an argument toward "put X first". Are there standard Julia examples that go the other way? If not I'd say the change is the way to go.

@cscherrer
Copy link
Collaborator Author

Since X can be determined statically from P, we might not need X to be in the type anyway. Let's try it out this way and see how it goes - we can come back to this if we need to. I'll close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants