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

Interval #21

Open
14 of 15 tasks
Hazurl opened this issue Jul 30, 2023 · 2 comments
Open
14 of 15 tasks

Interval #21

Hazurl opened this issue Jul 30, 2023 · 2 comments

Comments

@Hazurl
Copy link
Contributor

Hazurl commented Jul 30, 2023

An Interval represents a continuous range of numbers between two bounds. Both endpoints are contained in the interval. Moreover, the interval can be unbounded; but this iteration won't allow to construct open intervals.

1*: The in operator can be extended to arrays and maps. For maps, the value is checked against keys.
2*: An open interval returns +/-infinity as lower/upper bounds. Infinities can also be used in the constructor.
3*: Union is a term more often used, but it's not defined for disconnected intervals. intervalCombine will be a generalization to all pairs of intervals. If a user wants the strict union, they can verify first that the intersection is non-empty.

@Hazurl
Copy link
Contributor Author

Hazurl commented Aug 5, 2023

Arithmetic operators are a bit complicated to implements + it's not an important feature => removed

@5pilow
Copy link
Member

5pilow commented Sep 4, 2023

  • Interval operator[] var i = [100..200] i[50] // 150
  • [1.0..2.0] issue with lexer
  • Add an error on var i = [0.."salut"]
  • Opened intervals ]x..y[
  • Empty interval [..]
  • Empty collection ?

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