dillonkearns / incrementalelm.com

4 stars 0 forks source link

entry-gatekeepers/ #27

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Entry Gatekeepers

How does the bartender at your local bar know it's okay to serve you? In many cases, it's because the bouncer already checked your ID before you entered. This allows the busy bartender to focus on their job and just serve their fine customers drinks! In this post, you'll learn how to make your elm code just as organized as the bouncer and the bartender.

https://incrementalelm.com/entry-gatekeepers

O-O-Balance commented 2 years ago

Nice article, I like the examples and analogies 👍 I just wanted to point out a small oversight: module Kelvin exposing (Kelvin) should also expose fromKelvin. It might also be worth pointing out that the type constructor isn't exposed, and that that is a key ingredient (perhaps include the phrase "opaque type"). I see it is mentioned in passing in the last paragraph, but I think it's worth elaborating on that a bit.