Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

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

Open

Description

@ISSOtm

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.

Activity

  1. added
    enhancement
    good first issue
    on Jan 14, 2024
  2. evie-calico commented on Jan 16, 2024

    @evie-calico
    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.

  3. ISSOtm commented on Jan 16, 2024

    @ISSOtm
    ContributorAuthor

    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?

  4. evie-calico commented on Feb 1, 2024

    @evie-calico
    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.

  5. ISSOtm commented on Feb 10, 2024

    @ISSOtm
    ContributorAuthor

    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?)

  6. added this to the v1.0 milestone on Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions