Mainly, I'm curious.
We have an object called Unit
in our codebase - which represents a component for a bridge or a road. In our case, it can be ambiguous to see ReactiveUI Commands with Unit
as one of the Generics in a declaration.
Even in this old documentation (Google doesn't point me in the direction of the current documentation - where ever that is), it says:
"Represents void."
So now I'm wondering, is there any meaning behind the term Unit
. How come they didn't just call it System.Reactive.Void
?
To quote Wikipedia (which also gives examples of other languages using the same name)
a unit type is a type that allows only one value (and thus can hold no information).
In this case the value is Unit.Default
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With