Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

561–570 of 571 posts

Re: Rich Harris joins Vercel to work on Svelte full time

#561

Earlier quoted context omitted.

For all the use cases I deal with on a regular basis, Svelte looks more like vanilla HTML/JS than any equivalent React code. And the reason these things change is because that's what needed changing . One of the topline features of Svelte is that is has less boilerplate than React, and it achieves that quite handily. Unless you're criticizing particular constructs in Svelte that are unjustifiably different, I don't t…

What how can you say that??? {myItems.map({id, title}) => {title} } vs... svelte {#each myItems as item} {item.title} {/each} One is literally just javascript and html the other is an entirely different template language. You might say... JSX is not HTML... well it's very very similar... If you know HTML you JSX is very intuitive.

Yeah, now add state management, event handling, side effects and performance optimizations and come back with your example. You're just comparing syntax. This is very naive.

Re: Rich Harris joins Vercel to work on Svelte full time

#562
post #396

Earlier quoted context omitted.

What would that look like for you? Something like SwiftUI or Flutter (which feel React inspired) or a totally different thing?

Yes, these are moving in the right direction, but have a ways to go and are heavy for what they do. Visual Basic of old may actually be a better example. Even reactive models are built around matching data to the DOM, essentially. And there's still too much wiring that's required. I think where we'll see the innovation here is in the no-code and low-code platforms, which will move away from the model of code framewor…

I like the database-to-component binding idea. If you squint, that‘s what a GraphQL/React app simulates (with mountains of boilerplate).

I‘m not so sure about moving up the level of abstraction in the direction of no code tools. You can make it super easy to build the 1000s of CRUD apps we need today, but a dominant UI toolkit needs to be low-level enough so we can also build the kinds of apps we don‘t know about yet and the no code tools to make those apps. I think the component model popularized by react is here to stay for a while, especially because it fits in perfectly with the low/no-code tools, but everything around I can see improving.

Re: Rich Harris joins Vercel to work on Svelte full time

#563
post #557

Earlier quoted context omitted.

> No, they are JavaScript, it is array based programming wrapped Javascript has no support for array-based programming. So, hooks are not Javascript: they look like regular function calls, but: - they can only be declared and called before rendering - they can't be called out of order - they cannot be called conditionally - they have to be called a specific name to be handled correctly by React runtime - some (but no…

They are definitely javascript. I can click to definition of the useEffect function and see exactly what it is doing. I completely agree that learning them is a bit crazy, but ultimately every hook comes down to being a function execution.

> They are definitely javascript.

How come they break Javascript semantics and execution flow?

> but ultimately every hook comes down to being a function execution.

That's really beside the point when it comes to understand what something is and using them.

{#await promise} is immediately understandable from its use.

Hooks are... well, I already said above.

Re: Rich Harris joins Vercel to work on Svelte full time

#564

Earlier quoted context omitted.

> I don't see why the semantics of it not being included yet doesn't make it JS. You don’t see why something not being included in JavaScript doesn’t make it JavaScript? Really? > I'll concede that it's not "JS" it's an "experimental JS feature" JSX is not an experimental JS feature. You’re trying to draw an equivalence between decorators and JSX, but they aren’t equivalent at all. Decorators were submitted for inclu…

So far he's ignored instead of addressing all the valid points you've made, and now he's trying to derail the conversation by bringing up experimental features, which, as you say, have nothing to do with anything else. Since he's working from his own definition of the word "is", and his own definition of the JavaScript standard, there's no way he's going to admit what he said is wrong, even though it is, and the JSX…

[deleted]

Re: Rich Harris joins Vercel to work on Svelte full time

#565

Earlier quoted context omitted.

It's very easy to convert a hook to a HoC, purely wrapping that functionality in a class component.

Also true. It just seems like `class` has become a bit of a dirty word, at least the last two places that I've worked on React codebases.

I agree it has. I think this is because hooks have been talked about by facebook as the future of react. There seems to be no appetite for class based react improvements in the future. No wonder people move to the thing that will be better supported, regardless what it is.

Re: Rich Harris joins Vercel to work on Svelte full time

#566

I have recently joined a team that had invested in Svelte. I had previous experience in Angular and React. I was happy with React, but I decided to drink the koolaid and go all-in and do my best with Svelte. 6 months later, we're moving to React. It is partly because our Svelte code was messy enough to warrant a rewrite, and partly because we wanted to leverage the React ecosystem in that rewrite. It was also partly…

I don't like templating, it's too restrictive, feels like back to the 90s. This is typically aimed at coders who secretly don't want to code, and fall for tools that seems like they can avoid it.

What I like most about React is being able to break down views into functions and compose them. And if I have the choice, I prefer pure javascript and just a small helper function for Document.createElement instead of JSX, it makes it even more powerful, flexible and less verbose. You can already programmatically create elements in Javascript, I don't understand at all why people use "frameworks" for this, JS and HTML is already a view and a controller, just write the app? A complex single page application needs a couple of dozen lines of helper functions, that's all, why invent a whole new language on top of the language that in the end only restricts what you already have in the first place? This is spring framework enterprise hell all over again in the frontend

Re: Rich Harris joins Vercel to work on Svelte full time

#567
post #557

Earlier quoted context omitted.

They are definitely javascript. I can click to definition of the useEffect function and see exactly what it is doing. I completely agree that learning them is a bit crazy, but ultimately every hook comes down to being a function execution.

> They are definitely javascript. How come they break Javascript semantics and execution flow? > but ultimately every hook comes down to being a function execution. That's really beside the point when it comes to understand what something is and using them. {#await promise} is immediately understandable from its use. Hooks are... well, I already said above.

> How come they break Javascript semantics and execution flow?

wait what? since when do they break execution flow and javascript semantics?!

useEffect(function () { }); when exactly do you think the function will be called? - correct only the "framework" defines that, but that's completly normal javascript execution and semantic.

Re: Rich Harris joins Vercel to work on Svelte full time

#568

Earlier quoted context omitted.

Repeating a blog post over and over doesn't make it true. The author is wrong. Most of his statements are about React, not JSX. It's syntactical sugar for nested function calls, that's all. Brackets are turned into function statements, attributes are turned into object props. The author conflates React properties with JSX, which is wrong. The author also confused JSX limitations, you cannot do statements because it's…

Thank you for that definitive link. Note that first boldfaced sentence in that JSX specification is as follows: "It's NOT a proposal to incorporate JSX into the ECMAScript spec itself." That should have been the end of this discussion and fight that you picked about your incorrect statement that "JSX is JavaScript". You just unwittingly undermined and terminated your own argument by linking to the JSX spec itself, wh…

You're arguing the wrong thing. You're arguing a semantics debate about whether an extension is JS. I'm arguing that it allows you to use JS features instead of a custom template system.

In the semantics debate you want to have I think it is JS because it all becomes JS bytecode and it's just nested function calls in the end, but that's subjective. If you want to be pedantic it's a JS extension, but in the future it could be JS if the spec is merged into engines not the compilers.

JS is an umbrella term, you're arguing it's not Ecmascript, okay, I never said that. I said it's JS, and you want to have a tussle about it instead of comparing templating systems.

Also you're very rude.

Re: Rich Harris joins Vercel to work on Svelte full time

#569

Earlier quoted context omitted.

That makes sense though right? One would assume that shadow dom and dom would be slower than direct dom manipulation.

I'm not sure that's a fair assumption, one of the original sells of a shadow dom was that manipulting the dom directly is extremely slow, so doing as much work away from it is faster.

Because React's model requires tracking the entire DOM tree for changes and rewriting whole branches where a change is detected.

Svelte bypasses the whole problem for the most part. https://youtu.be/AdNJ3fydeao?t=247

Re: Rich Harris joins Vercel to work on Svelte full time

#570

Earlier quoted context omitted.

> I don't see why the semantics of it not being included yet doesn't make it JS. You don’t see why something not being included in JavaScript doesn’t make it JavaScript? Really? > I'll concede that it's not "JS" it's an "experimental JS feature" JSX is not an experimental JS feature. You’re trying to draw an equivalence between decorators and JSX, but they aren’t equivalent at all. Decorators were submitted for inclu…

So far he's ignored instead of addressing all the valid points you've made, and now he's trying to derail the conversation by bringing up experimental features, which, as you say, have nothing to do with anything else. Since he's working from his own definition of the word "is", and his own definition of the JavaScript standard, there's no way he's going to admit what he said is wrong, even though it is, and the JSX…

https://news.ycombinator.com/item?id=29195015#29208291
Post reply on HN