On Monday, April 27, 2015 at 9:50:10 AM UTC-4, Yuuki Soho wrote:
>
> There's one argument for * over +. That string concatenation is not
> commutative, and that + main property is to be commutative.
>
And most people think of * as being commutative also...
I would be strongly against overloading *any* binary numeric (or boolean)
operator to use for string concatenation.
Many times, you need to use vectors of characters for mutable strings...
but + and * have very different meanings for vectors in Julia.
a * b, if a is a Vector{UInt8}, will multiply each element by b, but a * b,
if a is a ASCIIString or UTF8String, concatenates them...
Very confusing, and not good at all.
Personally I don't mind * for string concatenation. If anything I would
> prefer to have matlab style concatenation, using []; it would make sense to
> use concatenation syntax for concatenation.
>
I had suggested the Lua .. operator, but it seems that was wanted for
ranges (I thought : was used for ranges in Julia though),
[] would be perfectly fine, and if it is easily understandable to the
*current* Julia community (I think that the community will extend far
outside the numerical computing world in the future), and not confusable to
those outside the numerical computing world, that would be great!
Scott