I like StaticArrays – the ability to say, “The type of this variable is a matrix with such-and-such a size.” I also love how powerfully brief my code can be in Julia, allowing me to stay very “mathy”, using LaTeX characters, like \times
for cross product.
Call it vain, but I wish there were a briefer way to create a StaticArray, like regular old brackets. Writing out the whole word SVector
interferes with the flow. I like how I can specify an IPv4, for instance, as ip"127.0.0.1"
. Could something like this work for StaticArrays, but with brackets? Like:
x = s[1.; 2.; 3.] # It's an SVector!
Or maybe we could use some other type of bracket or something.
Does this make sense? Does Julia support creations like this, or would Julia have to change to facilitate it? Or is there already a brief way to specify StaticArrays that I don’t see in the StaticArrays doc?