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

Deprecate @SVector, @SMatrix, and SA[...] in favor of @SArray [...]? #1214

Open
hyrodium opened this issue Oct 30, 2023 · 2 comments
Open

Deprecate @SVector, @SMatrix, and SA[...] in favor of @SArray [...]? #1214

hyrodium opened this issue Oct 30, 2023 · 2 comments

Comments

@hyrodium
Copy link
Collaborator

The SA notation was introduced in #633, and @SArray macro exists from the beginning.
Both features have the same purpose: "Provide simple ways to construct SArray!".

I now think it would be nice to deprecate the methods other than @SArray.
Here's why:

Disadvantages with SA[...]

Disadvantages with @SVector and @SMatrix

  • @SArray is enough. No additional benefits.

Disadvantages with @SArray

  • @SArray [1,2,3] needs more keystrokes than SA[1,2,3]
@mateuszbaran
Copy link
Collaborator

I don't really like SA either. I wouldn't make any formal deprecation but I think rewriting README.md to promote @SArray/@MArray as the primary convenient way of making static arrays is a good idea.

@SVector is used in so many packages that JuliaHub gives up shortly after reaching letter "C": https://juliahub.com/ui/Search?q=%40SVector&type=code .

@hyrodium
Copy link
Collaborator Author

Okay, I will open a PR to update the docs not to encourage @SVector, @SMatrix, and SA[...]. 👍

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