3 ms·
Valid points about the ambiguity in that example, but I do believe 'none' is easier to parse than 'null' for the average person. I'm assuming that none is meant
by hood_syntax 9y ago
Valid points about the ambiguity in that example, but I do believe 'none' is easier to parse than 'null' for the average person. I'm assuming that none is meant to represent, like null "no input was given" not "an input of zero/an empty list was given".
- vorotato 9y agoalso "Some | None" is a common functional programming idiom.
- amyjess 9y agoIt's worth mentioning that Python refers to null as None.
- mh-cx 9y agoBut in that case, wouldn't “unknown“ be even better? I'm not a native english speaker, though, so I may miss some fine nuances in the meaning of “none“.
- hood_syntax 9y agoDisclaimer: this is just my personal views, so I may be missing something here. 'unknown' is almost like saying "We don't know what should be here", while 'none' is closer to saying "We didn't get passed any information here". Ultimately, I feel like 'unknown' is more specific, it conveys intent beyond that of 'none'. Such as, it could imply we actually don't know what kind of data 'Opinions' should hold, rather than that there merely happens to be no data to put there.
- greggirwin 9y agoWe can throw out options for a long time, as there is no perfect choice. Ren went with `none` as it is standard Rebol and Rebol's designer thought about it long and hard.
- jpfed 9y agoAs a native English speaker, I agree that "unknown" is better than "none".
- always_good 9y agoI would hope that a native English speaker knows the difference between Cookies in the jar: none and Cookies in the jar: unknown
- greggirwin 9y agoUnknown is a nice word for this, yes. And while we don't focus exclusively on being terse in the Redbol world, "unknown" is a lot more work to type than "none", harder to scan visually as well.
- deleted 9y ago[deleted]