30 ms·
In Julia, you can actually omit the `*` for multiplication, if it involves literals, i.e. julia> x = 10 10 julia> 2x 20 julia> 2 x ERROR: syntax: e
by leethargo 7y ago
In Julia, you can actually omit the `*` for multiplication, if it involves literals, i.e.
julia> x = 10
10
julia> 2x
20
julia> 2 x
ERROR: syntax: extra token "x" after end of expression
But you have to be careful not to use white space either.
- yunruse 7y agoThat’s quite clever, actually. This way you could chain a complex string together with parentheses without needing a lot of pluses. Not the most useful of features, but it does explain why * is the concat operator.