Hacker News new | ask | show | jobs
by bsansouci 3061 days ago
What DSLs are you referring to here?

One reason to favor lists over arrays has been that they are immutable. Most of my personal JS array usages have been as dynamically sized arrays, because I’ll use .push all over the place. That usecase is the primary reason to use lists instead: it’s much faster to prepend and destructure on lists.

1 comments

Something like Elm's Html module:

    div [ id "test" ] [ text "stuff" ]
vs

    div [| id "test" |] [| text "stuff" |]
If the JS library expects an array (not uncommon), that gets ugly quickly.