Page 3 of 3

Re: NumOp/StrOp (with respect to !=/!==)

Posted: 17 Aug 2018, 00:02
by jeeswg
OT

Re: NumOp/StrOp (with respect to !=/!==)

Posted: 17 Aug 2018, 02:19
by Helgef
helgef wrote:What are your arguments?
You have only repeated what was already said on github. So why did we need this thread, and why shouldn't we have used github? Please do not answer that, we have achieved nothing.
- But using an operator is less verbose, and I usually only want 2 results (yes/no).
You say I, but assuming you actually mean one, i.e., you consider what is best for most users, I highly doubt this is true. My guess is that <1% of uses of < > are meant to compare strings, and >99% of the string compairson cases are for sort callbacks, i.e., one uses both < >. The other cases are such cases as Lexikos examplified. No one is doing,

Code: Select all

if animal < 'cat'
	msgbox 'its an animal alphabetically less than cat :=)'
And that is the only case where the operators are better than a StrCompare function, imo.
I'd be fine with the operators doing string compairson if mixed types weren't allowed, but that clearly isn't the route AHK is taking. Even then, I do not think they would be very useful, but they would be safer.

You also refer to my plan, as if there was one, there isn't.
I hope this thread ends here, and if someone has something related to ahk to discuss, they start a new thread with a clear singular topic.

Cheers, and good lock.

Re: NumOp/StrOp (with respect to !=/!==)

Posted: 17 Aug 2018, 02:57
by nnnik
I think I will lock this topic.
It has greatly deviated from anything that should be discussed in this forums.
I also think that this is a nice point to make people calm down.
So this topic is now locked.