Live data from Hacker News

VanJS – A no-JSX framework based on vanilla JavaScript

vanjs.org

141–150 of 178 posts

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#141
post #106

Earlier quoted context omitted.

It is really an odd flex. As soon as you need a transpiler, which many modern JS devs are going to want and need for the benefits they provide (Typescript being huge) then using JSX seems a benefit not a problem to solve.

Not needing to use a transpiler is genuinely the thing that excites me most about VanJS. If you're not a daily JavaScript developer, any form of transpiler / build mechanism seems almost guaranteed to break in the gaps between when you are working on a specific project. The projects I have that are transpiler/build free are SO MUCH more pleasant for me to intermittently hack on!

I use TypeScript exclusively over Javascript so being pure JS is a con not a pro to me.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#143

> 道可道,非常道 > (A rule that can be told by words, is not the rule that should universally apply) I'm curious where the dev got that translation or if they made it themselves. I have translated it before like "No method that can be explained is universally applicable" but I haven't seen many other translations like that.

Here is the break down of my understanding about the philosophy described in 道德经:

1. There might be some universal rules about the world. 2. There are limitations in human's understanding and human language. 3. For all the rules that can be described in human language (which is subject to the limitations in 2), they can't hold universally.

Putting into the context where the words are cited. Any claim (in human language) about programming like "you should program in this way" is most likely not universally sound.

Of course a philosophy book 2000+ years ago can be interpreted in a different way. Happy to see the elaboration of your understanding "No method that can be explained is universally applicable".

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#144

Earlier quoted context omitted.

Jsx never achieves plain-old-html in my view. is legal but isn't.

is which matches xhtml (if not html5)

Html 5 has displaced XHTML for decades. And notably, XHTML is not html. is valid html5, but the trailing slash is meaningless. In JSX, it's required.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#145
post #18

Love the use of functions to craft components. Such an undervalued way of writing a UI.

clojurescript and elm would perhaps interest you =)

I have struggled to use Elm because I rarely if ever need what it offers in my personal projects and at work we are a Lit shop.

Love CLJS though, I use that sometimes for personal work when I have an urge to lisp.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#146
post #143

> 道可道,非常道 > (A rule that can be told by words, is not the rule that should universally apply) I'm curious where the dev got that translation or if they made it themselves. I have translated it before like "No method that can be explained is universally applicable" but I haven't seen many other translations like that.

Here is the break down of my understanding about the philosophy described in 道德经: 1. There might be some universal rules about the world. 2. There are limitations in human's understanding and human language. 3. For all the rules that can be described in human language (which is subject to the limitations in 2), they can't hold universally. Putting into the context where the words are cited. Any claim (in human langua…

The word dao literally means “road” but by the time of the DDJ, it had come to mean “way of doing something” and “speech that explains how to do something”. Interestingly, in Greek “method” is meta + hodos and hodos means “road” so it’s an etymologically appropriate translation.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#147
post #143

Earlier quoted context omitted.

Here is the break down of my understanding about the philosophy described in 道德经: 1. There might be some universal rules about the world. 2. There are limitations in human's understanding and human language. 3. For all the rules that can be described in human language (which is subject to the limitations in 2), they can't hold universally. Putting into the context where the words are cited. Any claim (in human langua…

The word dao literally means “road” but by the time of the DDJ, it had come to mean “way of doing something” and “speech that explains how to do something”. Interestingly, in Greek “method” is meta + hodos and hodos means “road” so it’s an etymologically appropriate translation.

道 (dao) means "the way of doing thing" in modern-day Chinese as well. For instance, 王道 means the "the way of governing". 路 is more common for the literal meaning of "road", though 道 has a meaning of both "road" and "waterway" as well.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#148

Earlier quoted context omitted.

is which matches xhtml (if not html5)

Html 5 has displaced XHTML for decades. And notably, XHTML is not html. is valid html5, but the trailing slash is meaningless. In JSX, it's required.

XHTML5 is a thing.

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#149
It's too late for me. I, like Douglas Crockford, am completely done with JavaScript [1].

HTMX, LiveView, WASM, Dart, ClojureScript, Kotlin, ScalaJS, Dioxus -- There are lots of options folks. We don't need to surrender to the tyranny of JavaScript.

[1] https://www.youtube.com/watch?v=lc5Np9OqDHU

Re: VanJS – A no-JSX framework based on vanilla JavaScript

#150
post #148

Earlier quoted context omitted.

Html 5 has displaced XHTML for decades. And notably, XHTML is not html. is valid html5, but the trailing slash is meaningless. In JSX, it's required.

XHTML5 is a thing.

This is news to me. From what I can find (which is not much), it seems like XHTML5 is a further constraint on HTML5. So legal XHTML5 is legal HTML5.

https://en.wikipedia.org/wiki/HTML5#XHTML_5_(XML-serialized_...

If that's true, that means is not valid XHTML5 because 1) trailing slashes don't close tags in html and 2) div elements require a closing tag.

And if that's true, then it's still different from JSX. But this XHTML5 thing might be surpassing my comprehension.

Post reply on HN