News for hackers. Stuff that matters.
Re:Svelte Is Unappealing by cygned on Tuesday March 24, 2020 @05:20AM (#22673249)
As an example, I'd argue that the output of the Svelte compiler is surprisingly understandable.

https://svelte.dev/repl/f104bac93c9c48f5bd18322e3b9b9425?ver...

Re:Svelte Is Unappealing by tpetry on Tuesday March 24, 2020 @05:43AM (#22673329)
Are you kidding? It's at some point understandable when looking a minute at it, but this only a small hello world app. How will you be able to understand the generated code with a few dozen components and much more logic?
Re:Svelte Is Unappealing by jbergens on Wednesday March 25, 2020 @03:21AM (#22682617)
Great demo, even though I don't agree that it is easy to understand.

I have to try a larger program and see what it emits but I don't think junior developers will think it is easy. And trying to find your bugs if you connect things to the wrong component/part might be very hard to spot. I still think React dev tools are way nicer.

Re:Svelte Is Unappealing by bryanrasmussen on Tuesday March 24, 2020 @05:39AM (#22673308)
in comparison to what comes out of some webpack things I've looked at, yes it looks more readable. Offhand I don't agree with all their undefined lets there, but not a big issue either.
Re:Svelte Is Unappealing by chrismorgan on Tuesday March 24, 2020 @05:51AM (#22673360)
All those undefined lets are part of how Svelte components are constructed, and it can’t be done in any other way across the board. It may not be how you’d write such things manually, but for compiler output it’s sane. For simple cases like that one, the create (c) lifecycle method could essentially be shifted up into the let statements, but for some more complex cases that couldn’t be done, and if hydration is enabled it definitely can’t be done, because those variables can then be filled in one of two ways, creating (c) new nodes or claiming (l) existing nodes.