Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That literally isn't what I talked about.


3 out of 4 of your examples mentioned using js or a js-like DSL.

Explain your point better


It's enough to read the context of the discussion, don't you think?

Original complaint: "it's describing a "whole other language" they call Hyperscript"

Response: hyperscript is a completely separate technology. htmx generalizes hypermedia controls, that's pretty much it, and it can be used with any scripting tool you'd like

My response:

In reality [1] htmx defines its own non-optional DSL that you have to use.

---

I will add that as with any organically grown nice-to-have utility DSLs it's quite haphazard (it's hyperscript-like in one place, js-like in another place, both in some other places etc.). But that's the nature of such ad-hoc informally specified DSLs

[1] which can be easily verified by just visiting https://htmx.org


> In reality [1] htmx defines its own non-optional DSL that you have to use.

---

I don't use hyperscript with my htmx, ergo it IS optional in objective reality. Citing a use with it does not prove it can't be used without it.


https://news.ycombinator.com/item?id=40746543

Nothing in the htmx docs shows it's optional.


It also doesn’t show, at any point, that it’s required.

There’s no magic abstractions going on. Everything is regular html elements. You can just use the regular js api.

Reading the docs and having an understanding of how frontend works would give you that information.


What do you think the link to attributes on the front page does?

What do you think the whole reference is about?

What do you think the docs that use and show all that do?

> Reading the docs

https://htmx.org/docs/

Literally the first example uses htmx's DSL:

  <button hx-post="/clicked"
    hx-trigger="click"
    hx-target="#parent-div"
    hx-swap="outerHTML"
  >
    Click Me!
  </button>

The only place where it talks about anything else is a small section on scripting with a link out to a huge meandering essay with small examples lost in all the philosophical discussions.

Edit: Don't forget also that this is entirely non-optional because if you use htmx, you will load the full support for it whether you use it or not


The example provided is not hyperscript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: