Skip to content

Comment on Virtual DOM in Elm

Comments

Why so many strings and so few types, especially for somethings like Elm?

The same in PureScript would be

profile user = mkUI spec do div [ className "profile" ] [ img [ src user.picture ] , span [ text user.name ] ]

See, types everywhere. https://github.com/purescript-contrib/purescript-react/blob/...

Because the underlying DOM is essentially untyped. This is a low-level adaptor library. One could easily build a more strictly typed wrapper on top.

Let me rephrase the question: why haven't they already?

Why haven't you already?

They're literally announcing the untyped base library layer and the post specifically calls out the desire to build higher level abstractions. Elm is moving incredibly fast, so your question is totally unreasonable.

I don't use Elm. I'm more interested in PureScript. But, the API looks silly for a Haskell like language. There is some positive feedback for whoever cares. Like, I wouldn't take that API out in public because everyone will think, "why is there string-based programming in Elm?"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.