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

db 0 is always emitted at the end of a script #5

Open
ISSOtm opened this issue Jan 14, 2024 · 4 comments
Open

db 0 is always emitted at the end of a script #5

ISSOtm opened this issue Jan 14, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@ISSOtm
Copy link
Contributor

ISSOtm commented Jan 14, 2024

I'm not sure why it's always a zero. It seems to be intended as an implicit trailing return, but then I'm not sure why it's not emitted as such? (If return is not zero, that's another problem.)

Additionally, it'd be nice if it could be removed for scripts that don't need it. IMO it shouldn't be a default behaviour, in fact.

@evie-calico evie-calico added enhancement New feature or request good first issue Good for newcomers labels Jan 14, 2024
@evie-calico
Copy link
Owner

I'm not comfortable making no return the default, but a command line flag to toggle it would be nice and the 0 should obviously be corrected to a return byte.

@ISSOtm
Copy link
Contributor Author

ISSOtm commented Jan 16, 2024

Actually, I think such configuration should belong to the file itself, as otherwise it means files aren't self-contained—which I think you'll agree it not great.

Perhaps that should be configured in the env block?

@evie-calico
Copy link
Owner

I guess something like this would work:

env something_that_shouldnt_return {
    use std;
    noreturn;
}

I'm not sure what to call it though; noreturn is concise but not necessarily self-explanatory.

@ISSOtm
Copy link
Contributor Author

ISSOtm commented Feb 10, 2024

This seems like something that would belong to more "generic" configuration? Maybe some option(noreturn), or option("noreturn") syntax would work well? (I'd suggest porting the pool = syntax to that as well, so that pool is no longer a keyword?)

@evie-calico evie-calico added this to the v1.0 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants