Oh, right. I now see the same behavior in Matlab. Never went into this trap
-- probably because I was always using commas in array constructions.
Unfortunately (for me), there is a difference with these two spellings in
Julia.
On Monday, January 5, 2015 11:47:25 PM UTC+1, Stefan Karpinski wrote:
>
> Splitting expressions inside of array syntax is space sensitive as well:
>
> julia> [1 + 2]
> 1-element Array{Int64,1}:
> 3
>
> julia> [1 +2]
> 1x2 Array{Int64,2}:
> 1 2
>
>
> Of course this bothers me too, but it's another example of
> space-sensitivity..
>
> On Mon, Jan 5, 2015 at 5:42 PM, Hans W Borchers <[email protected]
> <javascript:>> wrote:
>
>> Style guides are not syntax rules. Every body writes n+1 at times.
>> Is there any other place in Julia where putting spaces (or not putting
>> spaces)
>> around arithmetical operators makes a difference?
>> Would this be allowed by the general Julia philosophy?
>> Will it not lead to errors very difficult to track down?
>>
>>
>