I came to Elm not knowing about the Maybe type. The hardest thing for me to grasp was the use case and being able to map : (a -> b) -> Maybe a -> Maybe b. And knowing when to use a Maybe (rarely) vs when to use a union type or refactor the code so it doesn't need the Maybe type.
If I was to qualitatively estimate the amount of time spent learning about Maybe. I'd say it took me a moment to understand `Maybe a = Just a | Nothing` and a couple of months to get comfortable enough with the Maybe type now to understand where it's needed in my app. So I'd tend to lean with Joey, the wording works for me and changing it would feel arbitrary and break the current grammatical 'symmetry' as in weapon = Just sword vs weapon = Something sword On Tuesday, 22 November 2016 08:19:21 UTC+11, Oliver Searle-Barnes wrote: > > I have to admit I did find `Just` very confusing when I first encountered > it, as mentioned earlier in this thread it implies some kind of limitation > which doesn't match the semantics of Maybe at all. That said, it was one of > those little oddities that very quickly become second nature, just wanted > to point out that it is a slight bump in the road for newcomers. > > > On Monday, 21 November 2016 18:34:05 UTC+1, Noah Hall wrote: >> >> Has anyone actually encountered anyone being confused by the names? I >> haven't. I think this a solution to a problem that doesn't exist. >> >> On Mon, Nov 21, 2016 at 6:15 PM, Will White <[email protected]> wrote: >> > I think that’s because you already know what Just means. I don’t think >> it’s >> > arbitrary though from an accessibility point of view. Some or None is >> easier >> > for newcomers to understand than Just or Nothing, especially as Some >> isn’t >> > misleading the way Just is, as Andrew described well. >> > >> > On 21 Nov 2016, at 17:05, Joey Eremondi <[email protected]> wrote: >> > >> > Honestly, these choices seem pretty arbitrary. Everyone has a >> preference. ML >> > uses Some/None, Haskell uses Just/Nothing. Some people find Something >> > intuitive, some don't. >> > >> > Given that the choices is (mostly) arbitrary, it seems best to stick >> with >> > the status quo. >> > >> > On Mon, Nov 21, 2016 at 7:47 AM, 'Andrew Radford' via Elm Discuss >> > <[email protected]> wrote: >> >> >> >> Probably inherited from Haskell, like a lot of other stuff. Doubt if >> there >> >> was any other thought put into it if I'm honest. >> >> >> >> On Monday, 21 November 2016 14:46:40 UTC, Will White wrote: >> >>> >> >>> Sorry, meant to say “I guess he’s already considered and rejected >> them”. >> >>> >> >>> On 21 Nov 2016, at 14:21, Will White <[email protected]> wrote: >> >>> >> >>> I prefer Some or None, for understanding. Though, unless Evan didn’t >> know >> >>> about them, I guess we’d already have them. >> >>> >> >>> On 20 Nov 2016, at 23:41, Robin Heggelund Hansen <[email protected]> >> >> >>> wrote: >> >>> >> >>> How about 'Some' and 'None'? >> >>> Those are not longer to type than what we have today, and they should >> >>> solve your initial confusion. >> >>> >> >>> søndag 20. november 2016 18.16.26 UTC+1 skrev Will White følgende: >> >>>> >> >>>> I'm talking about Maybe.Just, of course. Just has always seemed >> strange >> >>>> to me, as if it's hinting that it's something other than just the >> >>>> counterpart to Nothing. I don't know the reasons behind its naming, >> but I >> >>>> think I would prefer Something, as in "something or nothing". What >> do you >> >>>> think? >> >>> >> >>> >> >>> -- >> >>> You received this message because you are subscribed to a topic in >> the >> >>> Google Groups "Elm Discuss" group. >> >>> To unsubscribe from this topic, visit >> >>> https://groups.google.com/d/topic/elm-discuss/EHnuE_gGFuo/unsubscribe. >> >> >>> To unsubscribe from this group and all its topics, send an email to >> >>> [email protected]. >> >>> For more options, visit https://groups.google.com/d/optout. >> >>> >> >>> >> >>> >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Elm Discuss" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an >> >> email to [email protected]. >> >> For more options, visit https://groups.google.com/d/optout. >> > >> > >> > >> > -- >> > You received this message because you are subscribed to a topic in the >> > Google Groups "Elm Discuss" group. >> > To unsubscribe from this topic, visit >> > https://groups.google.com/d/topic/elm-discuss/EHnuE_gGFuo/unsubscribe. >> > To unsubscribe from this group and all its topics, send an email to >> > [email protected]. >> > For more options, visit https://groups.google.com/d/optout. >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Elm Discuss" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to [email protected]. >> > For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
