← Back to context

Comment by aatd86

9 hours ago

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.

People want this because JSX is all they are capable of.

One reason why things like this have never happened before is because the people who need this are only barely capable of working with HTML. The DOM supports a wide variety of technologies far outside and unrelated to HTML.

> 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.

  • 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.

    • Javascript being a decent functional language does not make DOM API functional.

      DOM API is 90-s era OOP