Skip to content

What is the gleam way to handle separation of behavior and data? #3242

Discussion options

You must be logged in to vote

In Gleam we favour solving specific concrete problems and typically avoid seeking as high a level of abstraction as possible. This has benefits in terms of performance and clarity, but in exchange will be less concise than a large codebase using more abstraction. The approach you've taken is fine but it is not what typical Gleam code looks like.

Aside: the name "fmap" in Haskell is tech debt! They wanted to call it "map" but it was already taken in the prelude. If you have no such tech debt in your language I say use the proper name of "map"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KeAiMianYang
Comment options

Answer selected by KeAiMianYang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants