Ancestors

Written by Emil Socks on 2024-12-30 at 12:45

Boy oh boy do I find myself wishing Elm had typeclasses

=> More informations about this toot | More toots from socks@social.emisocks.com

Toot

Written by Emil Socks on 2024-12-30 at 12:47

Or at the VERY least that it implemented all the functions for common typeclasses on common types

The Maybe type does have andThen which is really just >>= (it's very janky to rely on convention for that but whatever) but I now have to implement the Alternative functions myself

=> More informations about this toot | More toots from socks@social.emisocks.com

Descendants

Written by Emil Socks on 2024-12-30 at 12:48

Surely it's not THAT uncommon to want to take a list of Maybes and return the first Just. Plus Elm boasts about its aggressive dead code elimination so it wouldn't result in bigger apps to add these functions

Bleh

=> More informations about this toot | More toots from socks@social.emisocks.com

Written by kae on 2024-12-30 at 15:23

@socks there's stuff like that which used to be in the stdlib. Once it was "simplified" it got moved to various elm-community/TYPE-extra packages.

For instance, the function you're describing is Maybe.Extra.orList: https://package.elm-lang.org/packages/elm-community/maybe-extra/latest/Maybe-Extra#orList

=> More informations about this toot | More toots from kae_bytheocean@slime.global

Written by kae on 2024-12-30 at 15:24

@socks heh, for "instance"

=> More informations about this toot | More toots from kae_bytheocean@slime.global

Written by Emil Socks on 2024-12-30 at 15:26

@kae_bytheocean Oh, interesting. Hm, I would expect this stuff to be either in the standard library, or displayed prominently somewhere in the docs

=> More informations about this toot | More toots from socks@social.emisocks.com

Written by kae on 2024-12-30 at 16:11

@socks I think they've been full-on "let's make this as simple as possible for newcomers", and the vast majority of the methods in there aren't things newcomers think about.

I see this issue across all software documentation / education, really. I wish you could tell every doc or article your experience level and it decides what collapsed things to expand, etc.

=> More informations about this toot | More toots from kae_bytheocean@slime.global

Written by Emil Socks on 2024-12-30 at 16:12

@kae_bytheocean Yeah, I see that. It's not just the docs, Elm is trying a bit too hard to be newbie-friendly in general for my taste. Which is a shame because it also does a lot of things really well

=> More informations about this toot | More toots from socks@social.emisocks.com

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113741846557706836
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
407.569265 milliseconds
Gemini-to-HTML Time
2.509492 milliseconds

This content has been proxied by September (3851b).