Skip to content

Consider making None a normal Instance type with --strict-optional #1847

Closed
@ddfisher

Description

@ddfisher

NoneTyp is special cased in a lot of places, but—with strict optional—for the most part it behaves like a normal Instance type (and the special casing has to recreate that behavior). If we started tracking the truthiness of objects (see #1698), I think we could get rid of the vast majority of NoneTyp's special casing. (The only thing that I can think of that would remain its role in partial types.) This would make the code easier to reason about, and would have prevented some of the strict optional bugs we've seen so far.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions