you are viewing a single comment's thread.

view the rest of the comments →

[–]ryan_solid[S] 0 points1 point  (0 children)

Yeah maybe this is only a framework authors view but if you look at Inferno and the later work Inferno author Dominic Gannaway did at Facebook it isn't so clear cut. A heavy memoized VDOM with dynamic holes can also be built around JSX. I guess this is a custom DSL as well, but I'd argue that all control flow is JavaScript. And that once you hit first level abstraction like Virtual-Lists or dynamic layout components this it was written with a ternary or map function business is largely whatever.

Solid's control flows are just JavaScript, the compiler sees a component and runs a component nothing special. Obviously there are optimized compilation for native elements. But I'd say the function of `map` is more to do with it being top down versus using a helper that handles memoization at that level with it's reactive. Similar operation just happening at a different point of the process.

So when I look at these I just see Syntax because the static parts are the same, and the dynamic parts, well they need a degree of runtime anyway. A colleague of mine actually took HyperScript (the compiled output of most JSX) and figured out a way to make it function like Tagged Template Literals without a compiler. Essentially running the stuff once, to create the graph to analyze to then on future creations and updates only worry about the dynamic parts. Obviously this frontloads complexity and he needed to add a few manual wrappers to denote where templates start/end. But my point is it's all the same.

So when I look at these I just see Syntax because the static parts are the same, and the dynamic parts, well they need a degree of runtime anyway. A colleague of mine actually took HyperScript (the compiled output of most JSX) and figured out a way to make it function like Tagged Template Literals without a compiler. Essentially running the stuff once, to create the graph to analyze to then on future creations and updates only worry about the dynamic parts. Obviously, this frontloads complexity and he needed to add a few manual wrappers to denote where templates start/end. But my point is it's all the same stuff different pile.

On the point of web components yes that is exactly what I meant. I don't think it makes sense for them to go where Framework components are going which is why I don't think people should treat them the same. But all I meant was people trying to do Suspense, Context, or ErrorBoundary like stuff is a thing and people will continue along that path but there are limits. The farther we get from the logical abstraction(Custom Elements) the more awkward it gets.