Skip to content

Abstract types for alien objects #1099

@slindley

Description

@slindley

It is frequent when interfacing with JavaScript code to need to handle objects that do not have a Links type. They pass through Links via some alien JavaScript API, but Links code cannot itself inspect such opaque objects. Currently we can pretend that alien objects have some Links type, and we can ensure that Links code doesn't try to inspect them by choosing an uninhabited type such as [||]. It would be cleaner to be able to explicitly declare an abstract type to represent a particular kind of alien object. At the very least, we could build in one specific AnyJS abstract type for opaque alien JavaScript objects.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions