Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Interaction between 'let' and name section #37

Description

@manoskouk

Are there any thoughts about how 'let' should interact with the name section? I see two issues:

  • Since local indexes shift inside the scope of 'let', a consumer of the name section (e.g. debugger) has to track those scopes (or at least the number of bound locals).
  • There is no way to assign names to let-bound variables in the name section.

On a more general note, since 'let' seems to be creating some complications, maybe it should be removed and replaced with the rule that non-defaultable locals must be (trivially) provably initialized before use.

Activity

  1. rossberg commented on Sep 16, 2020

    @rossberg
    Member

    Agreed, the name section should eventually support let.

    since 'let' seems to be creating some complications, maybe it should be removed and replaced with the rule that non-defaultable locals must be (trivially) provably initialized before use.

    Yeah, but that would amount to control-flow-dependent type checking. Such systems tend to create considerably more complications, and a "trivial" approximation quickly becomes wishful thinking -- there always is another useful case that somebody wants to see handled.

  2. RossTate commented on Sep 16, 2020

    @RossTate

    If label types are extended to be able to specify that certain locals must be defined, that addresses all those complications.

  3. rossberg commented on Jul 22, 2022

    @rossberg
    Member

    Let was removed, so this is obsolete.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions