Re:Jeopardy Heatmap Written in Elm
by nateabele on Saturday January 22, 2022 @04:15PM
(#30040892)
You can also `import Html.Attributes as Attr` and do `Attr.style "foo" "bar"`, or `import Html.Attributes exposing (style)` and do `style "foo" "bar"`.
Or, you know, since it's a composable ML-style functional language, you can grab a package like elm-css[0] and do:
...which gives you full compile-time type-checked styles with a no-crash guarantee. Can Clojure Spec give you the same in your example above?
Incidentally, it's also less noisy than the equivalent block of Clojure code. Elm isn't perfect, and definitely gets verbose at points, but if you're going to criticize, make an informed comparison.
Or, you know, since it's a composable ML-style functional language, you can grab a package like elm-css[0] and do:
...which gives you full compile-time type-checked styles with a no-crash guarantee. Can Clojure Spec give you the same in your example above?Incidentally, it's also less noisy than the equivalent block of Clojure code. Elm isn't perfect, and definitely gets verbose at points, but if you're going to criticize, make an informed comparison.
[0] https://package.elm-lang.org/packages/rtfeldman/elm-css/late...