It is based on the first element, if these are equal, compare the next etc 
until you find an element that does not match. This is consistent with how 
Python compares tuples. It is also consistent with how C++ sorts Pairs.

On Tuesday, September 8, 2015 at 9:30:32 PM UTC+2, Seth wrote:
>
> I *think *it's based on the first element:
>
> julia> (2,2) < (3,3)   # this makes intuitive sense
> true
>
> julia> (2,2) < (1,3)   # this makes intuitive sense
> false
>
> julia> (2,2) < (3,1)   # this is somewhat confusing
> true
>
> but it might be nice to have pairwise comparisons, so that, for example, 
> one can tell whether a matrix can "fit" inside another matrix across all 
> dimensions via comparison of each matrix's size (in this case, the last 
> result would be false).
>
> I'm sure there's a reason the ordering is the way it is, though - does 
> anyone have any insight into what applications rely on this sort of 
> behavior? I'm probably overlooking something very basic since I'm focused 
> on a particular issue right now.
>
> Thanks for any insight.
>

Reply via email to