You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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[...]
SA[;;;] is not correct.
We can fix this, but we also can deprecate SA and reduce the maintenance cost.
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.
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 :)
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[...]
SA[;;;]
is not correct.SA
and reduce the maintenance cost.@SArray [;;;]
works fine. (x-ref: Extend@SArray
(nested cat, 1.7 syntax) #1009)SA[1,2,3]
is not consistent withFloat64[1,2,3]
etc.SA
seems hacky to me just likeTuple{1,2,3}
(UseStaticInteger
s instead ofTuple{1,2,3}
inStaticArray
type parameter? #807)SA[...]
createsSArray
, but no similar features forMArray
.@MArray [1 2;3 4]
is shorter thanMMatrix(SA[1 2; 3 4])
. (@SArray namespace hygiene #691 (comment))SA[i for i in 1:3]
is not supported.@SVector [i for i in 1:3]
works.@SArray rand(3)
etc.Disadvantages with
@SVector
and@SMatrix
@SArray
is enough. No additional benefits.Disadvantages with
@SArray
@SArray [1,2,3]
needs more keystrokes thanSA[1,2,3]
The text was updated successfully, but these errors were encountered: