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

misc range #618

Open
timotheecour opened this issue Feb 23, 2021 · 4 comments
Open

misc range #618

timotheecour opened this issue Feb 23, 2021 · 4 comments

Comments

@timotheecour
Copy link
Owner

links

@timotheecour
Copy link
Owner Author

@timotheecour
Copy link
Owner Author

  • range as return type causes other problems too, refs:

in nim-lang/Nim@8ee0771#commitcomment-38239130 araq argued "return types must not be Natural" (this came up recently here: nim-lang/fusion#18 (comment)), and instead suggested using {.ensures: cond.} for that.

@juancarlospaco
Copy link
Collaborator

Can compiler generate a warning when return type is a range ?.

@timotheecour
Copy link
Owner Author

it wouldn't be hard, but this should wait until {.ensures: cond.} is implemented (and honored by checks:on), refs nim-lang/RFCs#270, after which we can probably replace range (a non-transparent abstraction) into nim-lang/RFCs#270 (comment) (maybe).

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