Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

481–490 of 571 posts

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

#481

Earlier quoted context omitted.

True, although Svelte's syntax is chosen cleverly in a way that is not incompatible with existing tooling. (Starting a statement with $: is syntactically legal JS and a no-op.) Another question is how much of Vercel's resources would it take to contribute Svelte support into all the major tools.

It's not technically incompatible, but it's mostly parseable nonsense in the plain language. So it really only serves to make sure syntax highlighters still work, which is just one of many aspects of tooling Considering JSX's current level of support involved cooperation from multiple FAAMNGs, I doubt Vercel could match it

Can you give an example of tooling that is not compatible with encountering the $: label? I can only think of a linter complaining about an unused label "$" or a redefined label "$".

Compare this e.g. with how React linting has to know which functions are actually (custom) hooks, and they cannot have any idea about the semantics of custom hooks.

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

#482
post #369

Earlier quoted context omitted.

Not to mention it takes reactivity to new heights while adding amazingly little actual syntax. When property changes, the fetch refires, loading appears until the fetch resolves then it displays whatever array someFetch resolved to. I came from Vue and that plus the way Svelte does stores (literally nothing special about them) was a breath of fresh air. {#await someFetch(property)} Loading... {:then data} {#each data…

But what does ‘#await someFetch’ actually do ? The thing I like most about react is that it’s just executing plain Javascript most of the time.

> The thing I like most about react is that it’s just executing plain Javascript most of the time.

Then explain what hooks do ;)

Hooks are decidedly not Javascript (even if they look like Javascript), and are a much more weird construct than {#await promise}

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

#483
post #412

Earlier quoted context omitted.

JSX popularized it but we built it with opalang.org first (also with strong static typing before TS)

Opa was pioneering. Very impressive. Ahead of it's time. What stack do you prefer these days? It seems some folks still have their eye on the "full stack / single language" holy grail.

Thanks a lot!

I'm still appalled by the state of many things in JS tbh. I have the impression you have to perpetually move your codebase by adapting to your stack underlying changes, may it be the build system, the framework, tools or libraries that deprecate themselves quickly...

The reasons that made start Opa are still there: There should be an easy single language to program web apps and a clean coherent single stack to build and run them.

Today, I mostly code in Go and I love it (single stack, tests built in) despite the lack of generics.

On the front-end, it's another story. If I have time one day, I'll rebuild something in that space.

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

#484

Earlier quoted context omitted.

We’re not splitting hairs. It is, quite literally, not JavaScript in a fundamental way. If you want to go around telling people it’s a non-standard extension to JavaScript or if you want to go around telling people it’s a superset of JavaScript, then by all means do that. But it is simply not JavaScript . Why do you insist on saying otherwise? All that does is start completely pointless arguments. What do you gain fr…

I think you're getting a little too worked up. The point is this small extension to JS grammar lets you do templating with normal JS, instead of #for you can use .forEach, .map and other array methods. You can use JS instead of replacing tokens in a template. It's not a superset of JS, that's not accurate, it's an extension of the spec. I hope the JSX spec is added to the standard sometime to stop this stupid debate.…

> The point is this small extension to JS grammar lets you do templating with normal JS, instead of #for you can use .forEach, .map and other array methods.

But then React is much more than just "small extension".

Hooks alone are less of a Javascript than any Svelte template syntax.

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

#485

Earlier quoted context omitted.

I've not used any Svelte significantly yet, so your points may stand. I have, however, written React for years. If anything in Svelte is more confusing to juniors than how useEffect works, especially in conjunction with unstable references, I would be literally amazed. useEffect is a loaded automatic pointed at your face if you don't fully understand it. It is truly a terrible API due to how intimately you have to un…

Agree 100%. The migration from componentDidMount, componentDidUpdate, etc to useEffect was a major regression in terms of readability. The return function in useEffect vs. componentWillUnmount is just terrible. This is always a bizarre topic for juniors.

As someone familiar with the old react API, I agree 100% about useEffect being super arcane.

There's just too much magic going on, which is the same thing that makes me reluctant to write Vue or Svelte (after reading this)

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

#486
post #90

This is such great news! I've been vaguely aware of svelte for some time now but it wasn't until a few months ago that I started using it professionally and it is such a joy to use! I recently did an onboarding and explained why svelte instead of react of vue, and svelte code, to me, is so much more intuitive and clean! Thanks for the awesome work Rich and best of luck in this new chapter!

I'd like to hear more. What were your conclusions? I'm particularly interested in it compared to Vue. I picked Vue because of most people's complaints about React, so most of the comments I'm seeing are about specific gripes with React and don't really help me make an informed opinion.

I've used React extensively, and now I'm about into 1 year of Vue 2 with Nuxt after having switched jobs.

My gripes with Vue are:

- Despite they say it is not a "Python 2 to 3 like" situation, it is. Every library you find specifies if it is for Vue 2 or 3, some have versions for both, some are only for 2 and will never be upgraded to 3, others are just for 3.

- Vue doesn't have any spirit or ideas of its own. It just copies over every feature from every framework trying to be all to everyone, which leads to too many different ways of doing the same thing.

- There is a horrible culture of auto importing things (components, functions, ref sugar, etc) . This breaks tooling and editors, then they patch those to auto detect these tricks, then introduce a new one and everything breaks, then again..

- Many, many times I was trying to investigate a problem and you end up in a Github Issue which has part of the discussion in Chinese. Doesn't happen as much in official repos, but it happens in many of the third party libraries you end up needing anyway. Some libraries don't even have a readme in English.

- In the part of Europe I'm in, nobody wants to use Vue, so it is difficult to hire.

- Nuxt.js is terrible compared to Next.js. They're also in this "2 to 3" rewrite, and have been terrible at communicating. Probably our project at work will never move to Vue 3 and/or Nuxt.

- Community feels an order of magnitude smaller than react.

On the good site:

- It has a far, far, far better reactivity system than React. No need to manually track dependencies, memoize callbacks and components, etc.

- It is a lot more easy and intuitive, a lot less foot guns.

- It is a real framework, as you have an official router, state management solution, styling approach, etc. I love this.

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

#487
Honestly, don’t really know much or care much about Svelte for my own use. But hearing that someone is going to be sponsored to work on their invention full-time is wonderful. Glad to witness this personal victory and sending good vibes to help make Svelte great.

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

#488

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.

Seems like svelte is superior for not needing a key.

Both Svelte[0] and React[1] are the same in this regard, the key is there as an optimization and isn't required in either framework. The only difference is that React's key is on the element whereas Svelte is as part of the each expression.

[0] https://svelte.dev/tutorial/keyed-each-blocks

[1] https://reactjs.org/docs/lists-and-keys.html

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

#489

Earlier quoted context omitted.

Is it surprising that two-way data binding is a source of bugs? We learned that lesson from Angular, and it influenced React’s preference for one-way dataflow.

2-way data binding is still a useful pattern with discipline, and still also common in React (using event handlers).

It's never two-way in react. You're always in charge of updating the state in the event handler, which means you know where the update came from

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

#490

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've been developing websites and apps with Svelte for almost 2 years now, and my experience couldn't be more different from yours. > - Too much magic. The abstraction leaks and when it does, it requires a good mental model of Svelte's magic. I noticed this threw our juniors off. Since Svelte runs vanilla JS and works with the DOM directly, my experience debugging any "magic" has been extremely straightforward compar…

> Inexperienced developers will write bad code with or without powerful tools like Svelte stores. I don't think a framework is meant to replace experience, guidance, and coaching.

This is the gist of the whole comment. The person posting is not complaining about a bad Svelte experience, they're complaining about bad programming practices.

Post reply on HN