These days people are leaning towards returning a Nullable. On Thu, May 21, 2015 at 4:36 PM, Zenna Tavares <[email protected]> wrote:
> Yes, you are correct. Still I'm a little unclear whether Nullable or > nothing is more appropriate. I am trying to get closest to Maybe in > Haskell. > > On Thursday, May 21, 2015 at 4:19:59 PM UTC-4, Stefan Karpinski wrote: >> >> You may be confusing returning the object None with having a return type >> of None – i.e. not returning at all. >> >> On Thu, May 21, 2015 at 4:16 PM, Zenna Tavares <[email protected]> >> wrote: >> >>> For partial functions (i.e. those that may be undefined on some input), >>> the most correct thing to do seems to be to return None, the bottom type. >>> However the convention seems to be otherwise - either returning nothing, >>> when the function is only used for side effects, or a Nullable{T}, when >>> there are "missing values". >>> >>> Are there any best practices here? >>> >> >>
