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

Simplify comparision operators. #2

Open
hellokartikey opened this issue Jan 3, 2024 · 1 comment
Open

Simplify comparision operators. #2

hellokartikey opened this issue Jan 3, 2024 · 1 comment

Comments

@hellokartikey
Copy link

hellokartikey commented Jan 3, 2024

Why complicate things????

Motivation

Biro has three whole comparison operators. THREE!!! I dont like this kind of bloat from a language that claims to be "Don't complicate things." Frankly this just disgusts me. Biro-Lang... more like Bro-This-Is-Trash-Lang

Solution

Just have one comparison operator <=>, which in of it self is sufficient for all comparison needs. Daddy Turing would be very proud.

Examples

  1. a = 5 and b = 5, a <=> b would return 0.
  2. a = 6 and b=5.999999999, a <=> b would return 1.
  3. a = 723.68349 and b = 723.6835, a <=> b would return -1
@Meetesh-Saini
Copy link
Owner

This will complicate the things because biro doesn't have NOT operator.
So if we want to check if a is less than b then we will have to write:
is (1 <=> ((a <=> b) <=> -1) and ((a <=> b) <=> -1) <=> -1) ?

The current syntax is simplier:
is a less b ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants