opt
A simple and ergonomic optional type for Go. (by Southclaws)
null
reasonable handling of nullable values (by volatiletech)
opt | null | |
---|---|---|
1 | 4 | |
34 | 77 | |
- | - | |
3.5 | 0.0 | |
3 months ago | over 1 year ago | |
Go | Go | |
MIT License | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
opt
Posts with mentions or reviews of opt.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-10.
null
Posts with mentions or reviews of null.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-10.
-
Handling nil values: Pointers vs Abstractions
Is it a popular approach to use abstractions in general for handling nil values with libraries like null or mo? Should I just stick with pointers? What are your experiences on this topic?
-
Optional types and utilities for ergonomic data transformations
How is this different than something like volatiletech/null?
- How do you deal with nullable in JSON api?
-
Recommended pattern for many nullable properties on different types
This may help https://github.com/volatiletech/null
What are some alternatives?
When comparing opt and null you can also consider the following projects:
go-optional - A go package for wrapping types with Optionals to represent the lack of value without pointers.
opt - Generic Optional Package for Go
scala-lang - sources for the Scala language website
mo - 🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...)