JuliaArrays / StaticArrays.jl

Statically sized arrays for Julia
Other
772 stars 150 forks source link

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

Open hyrodium opened 1 year ago

hyrodium commented 1 year ago

The SA notation was introduced in https://github.com/JuliaArrays/StaticArrays.jl/pull/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

Disadvantages with @SArray

mateuszbaran commented 1 year ago

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 commented 1 year ago

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

pjaap commented 1 day ago

Has there been any progress regarding this issue? Personally, I am convinced by the arguments above and will stick only to @SArray and @MArray from now on.

OTOH, the other macros are widely used and we need a long deprecation phase. So better start early :)