←back to thread

218 points mdhb | 3 comments | | HN request time: 0s | source
Show context
aatd86 ◴[] No.44394976[source]
I don't quite understand. The DOM is/needs a functional API. Why bolt another DSL on top?

Now you have to find a way for javascript to interact with your template language.

While functions are sufficient. That doesn't look like orthogonal language design.

replies(2): >>44395653 #>>44395759 #
1. troupo ◴[] No.44395759[source]
> I don't quite understand. The DOM is/needs a functional API. Why bolt another DSL on top?

There are no parts of DOM APIs that are functional. It's all 90s-era Java OOP-style.

replies(1): >>44396109 #
2. aatd86 ◴[] No.44396109[source]
functional in the sense that it uses method calls on objects and javascript has higher order functions. It is a spectrum. I know DOM nodes are objects that use inheritance but I also know javascript is not deemed a "traditional" functional PL of course.
replies(1): >>44396914 #
3. troupo ◴[] No.44396914[source]
Javascript being a decent functional language does not make DOM API functional.

DOM API is 90-s era OOP