Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Missing design rationals for type annotated select #125

Closed

Description

@dbezhetskov

After removing subtyping rules (#87) it is unclear for me why we need type annotated select?
Right now we can infer the result type of select in the same way as we do for untyped version.
Is it just for future when we are able to return multiple values from select?

Activity

  1. dbezhetskov commented on Dec 7, 2020

    @dbezhetskov
    Author

    It is also weird that we can't use ref-types in select without type annotations, it forces engines to add vec(valtypes) for each select instruction. It is ok since select is a rare instruction but it is still small overhead here that we can avoid.

  2. rossberg commented on Dec 7, 2020

    @rossberg
    Member

    Subtyping has been deferred, but not dropped forever. The combination of subtyping on refs and allowing them as operands to unannotated select would always force us into computing lubs, which we want to avoid. So allowing plain select on refs now would not be future-proof wrt the later addition of subtyping.

  3. dbezhetskov commented on Dec 7, 2020

    @dbezhetskov
    Author

    ah, I see, thanks for the clarification @rossberg .

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