Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the <> operator. #105

Merged
merged 1 commit into from
Aug 12, 2018
Merged

Removing the <> operator. #105

merged 1 commit into from
Aug 12, 2018

Conversation

HelgeffegleH
Copy link
Contributor

Hello 👋.
Example,

(0<>0) ; Load-time error

Reason:
There is no obvious reason why both != and <> are needed, keeping != because it seems prefered by most.

If it wasn't available, we wouldn't add it for the same reasons we wouldn't add, eg, !< meaning >=

Cheers.

Reason:
There is no obvious reason why both != and <> are needed, keeping != because it seems prefered by most.
@Lexikos
Copy link
Collaborator

Lexikos commented Jun 25, 2018

If it wasn't available, we wouldn't add it for the same reasons we wouldn't add, eg, !< meaning >=

Your reasons are your own. I don't know what they are, so what you've written tells me very little.

<> and >! would be redundant if we have != and >=, but redundancy itself is not a reason. Larger documentation and binary code is bad, though trivial. Having more symbols to learn for the same effect is bad. Having different ways of expressing a thought can be good for the author, but bad for others.

Unlike !<, <> has been in AutoHotkey forever (even before expressions). Basic and derived languages use it (and not !=). Users sometimes translate VBScript to AutoHotkey. Some users are already familiar with VBScript before they encounter AutoHotkey. Because of this, there is a little value in keeping <>.

There are different ways of thinking; !< as "not less than" might better represent the author's thoughts than "greater than or equal". Sometimes it is easier or more fitting to add logical negation rather than reversing each operator. Perhaps that is why some SQL variants have both !< and >=.

The majority of my experience has been with languages which use !=, so my bias is toward removing <>. Further rationalizing, I could say that the reasons to have only one set of symbols for each operator (e.g. less to learn) probably outweigh the reasons for having redundant operators. Also, "not! equal=" fits my way of thinking better than "less than< or greater than>".

On the US layout, I think <> (Shift and two adjacent keys) is easier to type than != (two keys on opposite hands, with only one shifted).

@HelgeffegleH
Copy link
Contributor Author

Hello.

You make good points.

Your reasons are your own. I don't know what they are, so what you've written tells me very little.

The sentence you quoted wasn't intended to convey my reason for removing <>, it was meant to spark the readers mind, encouraging it to think about why we should have two ways of doing !=, with the hope that it would conclude that there was no good reason ✨ 💭. My main reason was given in the preceding sentence.

redundancy itself is not a reason.

In this case, and probably most, redundancy implies some cost, such as those you mentioned. Also, removing <> now, reserves it for future use.

easier to type

On my non-US keyboard, typing <> is not as you describe, but still probably easier than !=, hadn't I been so used to typing !=. It is a good point, I will enjoy typing it, if it is used for something else 😉.

Cheers.

@Lexikos Lexikos merged commit 03a646e into AutoHotkey:alpha Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants