Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

281–290 of 571 posts

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

#281
post #277

I have a stupid question: The cool thing about Svelte is that it compiles your code in a way so that when variables change, bindings in HTML change, but only that HTML and not an entire DOM re-render. (Right?) So, if this is the case, how come React couldn't do the same thing? They'd lose the ability to just include react in a script file, but why can't a smart compiler look at your JSX and throw out the virtual DOM…

i did try that - https://twitter.com/swyx/status/1294310598419689472 but when the core team is not interested in it there's only so much i want to push it on my own - rather just move to Svelte where the community already gets it

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

#282
post #186

Earlier quoted context omitted.

As a backend guy who moved away from frontend long ago for these very reasons, I have to ask: why are people downvoting this? Is it wrong? I'm genuinely asking, because from a bystander's point of view, it certainly seems like the pattern of the Framework Du Jour hasn't really slowed down much in the frontend community.

It's a false truth that anyone has to learn yet another one of these. Even Angular 1 and Backbone.js are still in production.

So is Joomla - yet I wouldn't recommend people learn it today. Might as well learn COBOL and Zend Framework too.

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

#283

I'm tired of having to learn yet another templating language without a very compelling reason. Why do I have to learn, what is essentially, a new programming language for each of these frameworks (Angular, Svelte, Vue, React... Do I really need to learn yet another language construct for stuff like `loops`, `if/else`, event handlers...etc. Why must all of these frameworks re-invent the wheel? At least with React it i…

React is a free for all, you can render pretty much anything you want at any time. With templating languages, the DOM output can be statically analyzed at build time, so the amount of work needed to diff the HTML output when things change at runtime can be dramatically shortened.

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

#284
post #277

I have a stupid question: The cool thing about Svelte is that it compiles your code in a way so that when variables change, bindings in HTML change, but only that HTML and not an entire DOM re-render. (Right?) So, if this is the case, how come React couldn't do the same thing? They'd lose the ability to just include react in a script file, but why can't a smart compiler look at your JSX and throw out the virtual DOM…

The React team had explorations of a compiler for React, I believe -

https://github.com/facebook/react/issues/9223 https://github.com/facebook/react/issues/7323 https://github.com/facebook/react/issues/7324

I also think this is why facebook had been investing in `prepack` - https://github.com/facebook/prepack

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

#285
post #256

Earlier quoted context omitted.

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.

Objectively, the Svelte example is cleaner and easier to read.

Subjectively, I’d say. But since I agree that it’s cleaner and easier to read- I upvote you

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

#287
post #86
post #81

Can someone explain what Vercel does. I'm familiar with Svelte, but interestingly not with Vercel. A scan of their website wasn't completely clear, but that is probably just me. Edit: thanks to all who answered, very helpful.

They are a competitor with other clouds like AWS/Azure/GCP/DigitalOcean with a focus on JAMStack and modern workflows.

More like a competitor to Netlify, GitHub Pages, etc

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

#288
post #277

I have a stupid question: The cool thing about Svelte is that it compiles your code in a way so that when variables change, bindings in HTML change, but only that HTML and not an entire DOM re-render. (Right?) So, if this is the case, how come React couldn't do the same thing? They'd lose the ability to just include react in a script file, but why can't a smart compiler look at your JSX and throw out the virtual DOM…

This might be possible in simple cases, but there are two reasons I think.

1. React has an ethos of being “just JavaScript” (despite the JSX syntax which is purely sugar around calls to React.createElement). This means the core team doesn’t seem to be interested in adding an extra compiler step. 2. Related to the above, because React is just JS, you can do all the normal and horrible things with it you can do in JS. Wanna pass React elements around in context or even using global variables? That’s allowed. A compiler could probably handle a lot of simple cases but there’s a whole lot of things it wouldn’t be able to deal with.

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

#289
post #207

Earlier quoted context omitted.

> but the idea of having to learn different language constructs for loops and the like doesn't seem that herculean of a task. I agree. As long as you understand the basic concepts, it's only a matter of learning the syntax, which is really not as big of a deal as the person you replied to is making it out to be.

It's not a herculean task... I agree, until you've learned 10+ (angular, vue, svelte, wordpress/php, jade templates, laravel, underscore/lodash, handlebars/mustache, hugo, etc..) of these "super simple templating languages"! And keep them all straight. I have no problem learning a new language if there is a compelling reason. But If it's just additional shit I have to remember for no clear reason... No thanks... We c…

You need to stop insisting that a wheel has been reinvented with Svelte. It shares 95% of the same DNA as other frameworks, with multiple improvements over them. So with that in mind, what you're actually suggesting is that the existing offerings were somehow perfect, and we don't ever need to improve on anything again. That is an absurd notion, especially given that the other frameworks have gone through MASSIVE changes since launch -- sometimes even complete rewrites, because they acknowledged they got it wrong the first time.

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

#290

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.

Seems like svelte is superior for not needing a key.
Post reply on HN