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

Questions about ipld schema #140

@rklaehn

Description

@rklaehn

Not sure what is the best way to communicate, so since the protocol labs MO seems to be to do everything in github, here is an issue.

Schema kinds

Why are these called kinds? In the context of type theory, kinds have a specific meaning, and calling these kinds seems confusing at least to me.

Here is the association I have when hearing about kinds in the context of a type system.
https://en.wikipedia.org/wiki/Kind_(type_theory)

Schema representations

## Fizzlebop is a pair of fields which serializes as "value-of-a:value-of-b" as a string.
type Fizzlebop struct {
	a String
	b String
} representation stringjoin {
	join ":"
}

Unless stringjoin prescribes some kind of escaping scheme, the type of a and b is not String but the subtype of all strings that do not contain the ':' character, otherwise the representation is not unique and thus not reversible. So basically saying that a can be any string is a lie.

  • Is something like "strings that do not contain ':' expressible in ipld schema?
  • I find representations for a limited subset of a type somewhat frightening. The type definition is no longer that useful since you need to know the representation to know the limits. Also, the info that the strings may not contain : is only very implicitly available and thus not obvious.

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