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

[Feature] Make exit function a builtin #285

Closed
Ph0enixKM opened this issue Jul 7, 2024 · 4 comments · Fixed by #402
Closed

[Feature] Make exit function a builtin #285

Ph0enixKM opened this issue Jul 7, 2024 · 4 comments · Fixed by #402
Labels
compiler enhancement New feature or request

Comments

@Ph0enixKM
Copy link
Member

Is your feature request related to a problem? Please describe.
exit(code: Num) function is so simple and universal that it could be a builtin exit code:Num

Describe the solution you'd like
The following syntax:

exit 1

Remove the following function from std lib:

exit(1)

Describe alternatives you've considered
N/A

Additional context
This introduced a breaking change

@Ph0enixKM Ph0enixKM added the enhancement New feature or request label Jul 7, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Amber Project Jul 7, 2024
@b1ek
Copy link
Member

b1ek commented Jul 8, 2024

i wonder if exit is considered infallible. afaik we have decided sometime before that we add only infallibles to builtins, right?

@Ph0enixKM
Copy link
Member Author

i wonder if exit is considered infallible. afaik we have decided sometime before that we add only infallibles to builtins, right?

I think that it’s as infailable as echo so we can assume it’s infailable

@b1ek
Copy link
Member

b1ek commented Jul 9, 2024

tbh i dont think that even echo is infallible. there are some conditions where there is no fd 1, right?

@Ph0enixKM
Copy link
Member Author

@b1ek Yeah. But then can we even run anything bash related?

@Mte90 Mte90 added the compiler label Jul 19, 2024
@Mte90 Mte90 linked a pull request Sep 3, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in Amber Project Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants