Skip to content

A way to distinguish "gradual typing" from "anything possible" #2711

@Strech

Description

@Strech

Since the renaming any into untyped there is no good way semantically to separate your progress of gradual typing from the uncontrollable type.

In Datadog we build some tools to help us track gradual typing progress and we have to define our way to express situations like "this is user input and literally anything could be given".

For now, we just stick with a simplest solution to alias untyped as any and make an agreement to use any only when we can't narrow down the expected type due to its nature.

module Datadog
  type any = untyped
end

Maybe we also could use some other types for that alias like Object or BasicObject, but this is not the point.

What is your opinion on RBS providing a built-in way to distinguish "I don't have to type it now" from "I don't control the type, it could be anything" or is there a better way of doing that differentiation?

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