Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

491–500 of 571 posts

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

#491

Earlier quoted context omitted.

I am really curious to hear about specific examples of some of these points. Specifically: > The abstraction leaks and when it does, it requires a good mental model of Svelte's magic. Maybe because I have familiarized myself with how Svelte works I haven't noticed anything like that. > Things that are easy in React at runtime turn out to be surprisingly difficult in Svelte I suspect this is from trying to use React p…

Not the GP, but here's an example of abstraction leaking straight from their intro tutorial: > A simple rule of thumb: the name of the updated variable must appear on the left hand side of the assignment. For example this... const foo = obj.foo; foo.bar = 'baz'; > ...won't trigger reactivity on obj.foo.bar, unless you follow it up with obj = obj. This looks like a huge footgun to me, and it's not even an exotic useca…

It's not an abstraction leaking, it's an important point to understand about mutating objects.

You are allowed to use `const` to declare an object and then modify its properties, because modifying properties is not the same as reassigning.

You're absolutely right that it's something that might catch you out, but not understanding the difference between reassigning and mutating is likely to lead to other bugs and falling into other traps in future.

(by 'it's not an abstraction leaking', I mean 'the abstraction's behaviour is consistent with the behaviour of the language' - I guess it's a subjective opinion that it's not leaking)

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

#492

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 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…

Yeah useEffects was the start over overcomplicating react.

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

#493

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…

This is unfortunate for your team, but most of your conclusions are not adequate.

1. Actually, Svelte has much less "magic" involved than React. Sveltes abstractions are not leaky. The reactivity might be more difficult to understand. But the rules are well defined. They are strange - no doubt - but not leaky. When looking at the generated code it's actually much more obvious what is going on than what React is doing. React on the other hand has some leaky abstractions. The biggest one is the effort you have to put into to make it efficient (memoization). Also, hooks.

2. Two way data binding is not a constant source of bugs. Then every team using Vue, Svelte, Angular, React with MobX would have those troubles. I've done 8 years frontend dev in a large company using React and Angular (and recently Vue 3) with different teams. The bugs come from people not technology. I've seen no other correlation there.

Granted, React has the largest ecosystem of all of them, but what do you actually need?. In that regard, Vue hits the sweet spot.

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

#494

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.

I actually think that useEffect is an amazing abstraction. It lets you group related functionality like subscribing and unsubscribing into one place and makes it very difficult to leak stuff or use stale values.

I didn’t write many class components beforehand though, so my mental model didn’t have to change all that much.

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

#495
post #407

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 find the javascript-native flexibility of JSX far more expressive than any custom templating JSX is the most significant contribution that React brought to front-end programming. Personally I don't always use React, but I use JSX quite often. It's intuitive in a way custom syntax (the dozens of) never will be.

Funny as when I used React back in 2015 it was my least favorite feature (I moved to Vue since then).

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

#496

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…

useEffect makes easy things easy and hard things very hard indeed. After building a few non trivial apps in React with hooks I'm convinced that what you really need for that model to work smoothly is a new language that tracks things like hook dependencies for you.

MobX does that.

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

#497

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…

useEffect makes easy things easy and hard things very hard indeed. After building a few non trivial apps in React with hooks I'm convinced that what you really need for that model to work smoothly is a new language that tracks things like hook dependencies for you.

mobx tracks dependencies for you, and it's not magic if you understand the basic concepts of proxies and dereference

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

#498
post #186

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…

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.

The comment is negative and incorrect

all of the js frameworks mentioned are view layer libraries. i.e. they create html. Hence they need a DSL for writing templated html, which will be used for generating final html

Hence, it is completely natural for them to offer a custom DSL as html does not have standard way of expressing those concepts.

Since each js framework has its own idiosyncrasies and motivations, custom DSLs reflect it.

If you were to go around and make a new js framework, you too are going to create a new DSL

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

#499
post #399

Earlier quoted context omitted.

> ecosystem is larger by a good amount. Svelte’s ecosystem is, in practice, actually much larger than React and any other framework because Vanilla JS works out of the box without framework specific wrappers. So just about any JavaScript package can be imported into a Svelte file and used without hassle.

> So just about any JavaScript package can be imported into a Svelte file and used without hassle. But you can import any package into React (or any other framework) as well.

You cannot even import native javascript functions. Looking at you, useInterval and useJoinString

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

#500

This is such amazing news! Betting on Svelte was the best thing ever for both my career and sanity. I'm now heavily involved in the Svelte community and next Saturday we'll be hosting our fourth conference solely dedicated to Svelte. If you're interested in checking it out the URL is here, it's free and will be streamed on YouTube: https://sveltesummit.com There are also two watch parties that will be hosted in New Y…

Genuinely curious, what’s there to do about for an entire conference about a single library? For someone from academia, where conferences typically span an entire field of research, this seems extremely niche and quite boring after a bit..

Because the last Computer Science Conference I went to wasn't small and cozy enough that I got to hang out and personally chat with the leaders in the field.
Post reply on HN