Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace NullType with NullableType(BottomType()) #284

Open
3 tasks
MeAmAnUsername opened this issue Apr 8, 2022 · 0 comments
Open
3 tasks

Replace NullType with NullableType(BottomType()) #284

MeAmAnUsername opened this issue Apr 8, 2022 · 0 comments
Labels
Component: code base The code quality of the project (does not affect functionality) Component: DSL Something that concerns the design of PIE DSL Priority: low Status: specified Enhancement that is ready to implement Type: enhancement New feature or request

Comments

@MeAmAnUsername
Copy link
Owner

MeAmAnUsername commented Apr 8, 2022

Summary
Replace the type NullType() with NullableType(BottomType())

Todo

  • Add tests?
  • Implement
  • Update documentation

Reason
It is inelegant that a type can be nullable without being NullableType(_). This also makes it explicitly clear how the type hierarchy works.

Implementation
NullType() with NullableType(BottomType()) should just work.

Related issues

Background information
This is also how it is done in Kotlin, as is described in this blog post

@MeAmAnUsername MeAmAnUsername added Type: enhancement New feature or request Status: specified Enhancement that is ready to implement Component: DSL Something that concerns the design of PIE DSL Component: code base The code quality of the project (does not affect functionality) Priority: low labels Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: code base The code quality of the project (does not affect functionality) Component: DSL Something that concerns the design of PIE DSL Priority: low Status: specified Enhancement that is ready to implement Type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant