Am 04.08.15 um 00:22 schrieb webwarrior:
We're drifting too much into philosophy here. Meaning of this, meaning
of that...
Thanks. I'd love to be clever enough to be a philosopher.
I'd argue there is no intrinsic meaning in statements such as "string A
is less than string B". But it is usefu
On Mon, Aug 3, 2015 at 12:04 AM, Peter Uhnák wrote:
>> (a b c) = (b a c) if a = b
>>
>> (a b c) < (b a c) if a < b
>> The semantics are well defined.
A comparison between sequenceable collections compares each element in sequence.
This makes intutive sense.
> Since you mentioned JavaScript, you
We're drifting too much into philosophy here. Meaning of this, meaning
of that...
I'd argue there is no intrinsic meaning in statements such as "string A
is less than string B". But it is useful to have order defined on set of
words and character strings in general. Lexicographic order has some
Am 02.08.15 um 15:23 schrieb webwarrior:
On 02.08.2015 15:44, jtuchel [via Smalltalk] wrote:
> I'd say it is questonable if SequenceableCollections should be
> comparable by default.
>
> is (a b c) equal or lower than (b a c) ?
> Doesn't this depend heavily on what is in the Collection and what
I think nobody's arguing that comparison of Collections is wrong per se. It's
just that such an extension should not be part of the core libraries, or put
differently, Smalltalk should not be extended in that direction, because the
assumptions about what may or may not be the meaning of comparin
Your use case (comparing containers using pluggable comparison for
items) is pretty common.
And what I was suggesting won't solve that problem.
However, it will make sequencable collections with comparable items
comparable. That's it. If we have comparison defined for Point, why not
have it fo
On Sun, Aug 2, 2015 at 6:44 PM, webwarrior wrote:
>
> On 02.08.2015 19:02, Peter Uhnák [via Smalltalk] wrote:
>
> > (a b c) = (b a c) if a = b
> >
> > (a b c) < (b a c) if a < b
> > The semantics are well defined.
> >
> >
> > Since you mentioned JavaScript, you should know that you ca
On 02.08.2015 19:02, Peter Uhnák [via Smalltalk] wrote:
> (a b c) = (b a c) if a = b
>
> (a b c) < (b a c) if a < b
> The semantics are well defined.
>
>
> Since you mentioned JavaScript, you should know that you can't compare
> arrays with ==, because it does object comparison.
>
>
>
> (a b c) = (b a c) if a = b
(a b c) < (b a c) if a < b
> The semantics are well defined.
Since you mentioned JavaScript, you should know that you can't compare
arrays with ==, because it does object comparison.
No. Sorted collection maintains order of its elements, and I'm talking
> about or
> I'd say it is questonable if SequenceableCollections should be comparable by
> default.
+1
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
No. Sorted collection maintains order of its elements, and I'm talking
about order on [the set of] sequencable collections
On 02.08.2015 15:46, jtuchel [via Smalltalk] wrote:
> Am 02.08.15 um 14:11 schrieb webwarrior:
> > I was surprised when discovered that in Pharo comparison is not
> defined
On 02.08.2015 15:44, jtuchel [via Smalltalk] wrote:
> I'd say it is questonable if SequenceableCollections should be
> comparable by default.
>
> is (a b c) equal or lower than (b a c) ?
> Doesn't this depend heavily on what is in the Collection and what the
> meaning of the Sequence of two Collec
Am 02.08.15 um 14:11 schrieb webwarrior:
I was surprised when discovered that in Pharo comparison is not defined for
lists, arrays and similar datastructures.
Because in almost every programming language (F#, Python, Javascript just to
name few) you can compare lists, arrays, etc. By convention,
I'd say it is questonable if SequenceableCollections should be
comparable by default.
is (a b c) equal or lower than (b a c) ?
Doesn't this depend heavily on what is in the Collection and what the
meaning of the Sequence of two Collections is?
So I'd say there is not much use in putting compa
I was surprised when discovered that in Pharo comparison is not defined for
lists, arrays and similar datastructures.
Because in almost every programming language (F#, Python, Javascript just to
name few) you can compare lists, arrays, etc. By convention, the ordering is
lexicographical, just like
15 matches
Mail list logo