JSX syntax and QuasiQuoters in PureScript

what complexity? jsx works pretty much out of the box everywhere else and the tooling is barely visible to the end user. I think the value is immense as seen by the wide adoption in the js world. Also, what do you mean with it doesn’t pay off in the long term. Pay off to whom?

I find a really interesting example of a “jsx”-like solution here: Deku - Pursx

In the docs of deku by @mikesol.

Perhaps such a solution can also be generalized for other Libs?

Example from deku:

myHtml =
  ( Proxy
      :: Proxy
           """<nav class="flex" aria-label="Breadcrumb">
                 <ol role="list" class="flex space-x-4 rounded-md
                    ...
1 Like

I believe this talk fits very nicely in this context (simplicity vs easiness):

JSX is “familiar,” of course, but QuasiQuoters (let’s say probably the “correct” way of implementing an external language in a host language) in my humble opinion, enable such “complex” use cases that very rarely pays off compared with an internal language (or embedded language) - if the host language has the features for such endeavors.

Correct if I’m wrong, but I believe deku’s approach is more for quickly copying and pasting HTML in PureScript, it does not offer IDE LSP features like auto-complete or docs for the language in PureScript.

1 Like