Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

521–530 of 571 posts

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

#521

Earlier quoted context omitted.

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

Not to argue semantics, but that pattern is still called two-way databinding in my neck of the woods. In this deprecated page from the official docs, two-way databinding is defined as:

> Two-way binding — implicitly enforcing that some value in the DOM is always consistent with some React state — is concise and supports a wide variety of applications.

[1] https://reactjs.org/docs/two-way-binding-helpers.html

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

#522
post #396

Earlier quoted context omitted.

The problem with each of these frameworks is that they make the mistake of surfacing the underlying standards like HTML and the DOM. This is why they look remarkably similar and can only possibly be incrementally better, at best. HTML and the DOM are still essentially modeled on static documents. Building apps that deal directly with these standards is an impedance mismatch that, remarkably, people keep trying to sol…

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 frameworks to better componentize and abstract away the low-level details. They'll surface high-level interactions via an elegant event model, and automatically handle reactivity through easy to specify component-to-database bindings.

The concept of a lower-level code framework will be replaced by that of a simplified abstract "environment" in which devs work.

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

#523

Earlier quoted context omitted.

Looks great! Seems to me that there’s just not enough pain around this. Ironically, React being “good enough” at performance (in most cases) probably means that there’s not appetite for squeezing out the last few millimeters (again for the vast majority of use cases — clearly there is some need otherwise svelte wouldn’t exist).

I often ear this "vast majority" claim but is it true? Every slow website I encounter is react or angular based. Maybe I just don't notice the fast ones, but react and fast enough are not really my experience

The ones based on next.js are pretty fast. but yeah vanilla react apps tend to be on slower end

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

#525

Earlier quoted context omitted.

The problem with each of these frameworks is that they make the mistake of surfacing the underlying standards like HTML and the DOM. This is why they look remarkably similar and can only possibly be incrementally better, at best. HTML and the DOM are still essentially modeled on static documents. Building apps that deal directly with these standards is an impedance mismatch that, remarkably, people keep trying to sol…

perhaps you are right about DOM but isn't HTML/XML just a way of representing an object tree... I don't see anything inherently wrong with this?

Yes, but while great for telling a browser how to render that tree, it's not an efficient way of mentally representing a frequently-updating app-driven UI.

What devs are really rendering is a tree of components, laid out on a canvas. There's no reason they should have to think in terms of how those components are managed or represented in lower-level HTML, any more than in binary.

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

#526

Earlier quoted context omitted.

No, it's not wrong, it's absolutely correct. There's a lot of flexing around who can come up with the most elegant abstraction which ignores the important point: making sure what's necessary to understand the framework, use it long-term, and move away from it after is focusing on the core technologies of the web (HTML, CSS, and JavaScript). The abstractions are cool, but completely unnecessary (see link to my framewo…

The parenthetical makes the comment!

I applaud your sarcasm and award it 10 points.

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

#527

Earlier quoted context omitted.

Are decorators JS? Answer that question and I'll respond to the rest of your comment. We're talking in circles a bit so I'd like to drill that down first.

Decorators are a stage two proposal. This means that they are not yet JavaScript, but are expected to be soon.

The point of all of this is it's a JS feature, not a system written on top of JS. A few syntax changes unlocks the rest of JS instead of having to reinvent the wheel, making your own loop and conditional systems. I don't see why the semantics of it not being included yet doesn't make it JS.

When the feature isn't in all browsers and only Babel doesn't make it not JS, similar to how async functions were JS before being natively in JS engines.

You're not being genuine when you say decorators aren't JS. No one looks at Angular 2 and says "whoa that's using some foreign language mixed with JS", they say it's using a JS experimental feature.

I'll concede that it's not "JS" it's an "experimental JS feature", I'll use that in the future to avoid this pedantic debate.

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

#528

Earlier quoted context omitted.

Are decorators JS? Answer that question and I'll respond to the rest of your comment. We're talking in circles a bit so I'd like to drill that down first.

The reason you're going around in circles is because you keep insisting on repeating something that's not true. Again, at the risk of repeating the truth: "Repeating it over and over again does not make it true." There's no need to "drill down" or infinitely recurse on yourself: simply execute a "break;" and stop repeating things that aren't true, and your infinite "while" loop will terminate, and your function will…

Please see the reply I posted to @JimDabell, I didn't answer you due to your rudeness, but my reply applies to your points as well, your wall of text was the same as his two sentences.

edit: I'll expand for you...

I'm sorry you wanted to get sucked into "is an experimental feature JS feature JS or not". That was not my intent. The entire intent was you can use JS by using the JSX extension. Instead of #for you use JS iterator functions. You can use non experimental JS features in JSX instead of conditionals or loop systems you roll yourself. Your only argument is "oh it's not included yet" okay, no shit.

Anytime someone says JSX is JS they don't mean it's currently in the standard spec, no one is arguing that, they're arguing you can use JS language features instead of a custom template system.

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

#529
post #211

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…

Any new language/framework trying to sell me on it's improved ergonomics should not bother showing me syntax and instead show me a stack trace. Vue is really concise and expressive but seeing a pile of node internals on every typo is infuriating.

Very true... How can I debug this thing when it breaks that's a great question. I wonder how sourcemaps work with svelte

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

#530

Earlier quoted context omitted.

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.

We're not talking about React we're talking about JSX.

Svelte has a lot more going on than it's template language as well.

We're only comparing the templating system to JSX.

Post reply on HN