Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Motivation for banning intertype recursion is not 100% clear #137

@matklad

Description

@matklad

Mostly drive by observation, but the explainer currently says:

intertype type definitions are required to be acyclic. This restriction follows from the fact that interface types are meant to be used at inter-language boundaries to copy values and matches the restrictions of other IPC/RPC schema languages.

I am not sure it’s fair to say that the restriction (logically) follows from IPC requirement: there are IPC/RPC systems which are fine with recursive type. To give one example from a domain I am familiar with, DocumetSymbol from language server protocol is sent over the wire and is recursive. Apparently, protobuf also allows recursive types: https://stackoverflow.com/questions/5945136/self-referencing-fields-in-protobuf-messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions