Live data from Hacker News

Svelte is a language

gist.github.com

1–10 of 95 posts

Re: Svelte is a language

#2
> Svelte is a language.

All Javascript frameworks may become implementations of SAT solvers, where rendering and state are scheduled constraints, i.e. tiny operating systems.

NPM uses CSS as a query language - https://news.ycombinator.com/item?id=33136843 - 9 months ago

Then apps may be instantiations of the framework.

Re: Svelte is a language

#3
Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

Re: Svelte is a language

#5
post #3

Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

Or maybe one day people will realize render functions explicitly listening to event emitters is actually a better pattern than implicit reactivity.

Re: Svelte is a language

#6
post #3

Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

https://dev.to/this-is-learning/the-evolution-of-signals-in-...

Re: Svelte is a language

#8
post #5
post #3

Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

Or maybe one day people will realize render functions explicitly listening to event emitters is actually a better pattern than implicit reactivity.

Certainly I've had a lot of fun with wiring mobx up to various things that provide render functions (react with mobx viewstate classes is way nicer than hooks to me).

Svelte I've never quite got the hang of to the point where I feel comfortable expressing an opinion about it (and I haven't spent enough time experimenting to claim my not having got the hang of it yet means anything either).

Re: Svelte is a language

#9
post #5
post #3

Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

Or maybe one day people will realize render functions explicitly listening to event emitters is actually a better pattern than implicit reactivity.

Event emitters/listeners are entirely too magical and borderline impossible to write automated tests for imo.

I don't think that's a good direction to go.

Re: Svelte is a language

#10
post #5
post #3

Great insight. It feels like at some point reactivity as a language primitive should be built into js. Most frameworks start with this and then build out into a opinionated implementation, dissolving the ecosystem into framework fragments. Any known reasons why this is / was never implemented?

Or maybe one day people will realize render functions explicitly listening to event emitters is actually a better pattern than implicit reactivity.

I think it is a shame that the Observable proposal [1] still seems somewhat stuck in Stage 1. It's a better idea than just raw event emitters because of composability (if no other reason). Making Observables "first class" could go a long way to unifying a lot of reactivity patterns in various frameworks, in theory at least.

To be fair, Observables and especially Observable composition has a rough learning curve and many frameworks like Svelte intentionally prefer implict reactivity and avoiding things like explicit Observables because they are seen as too complex/"too hard" for the average developer.

(Then you get awful worst of both worlds frameworks like Angular that sort of rely on Observables but yet also don't trust teaching Observables and wind up with code that isn't properly Observable and so also has all the code for implicit reactivity and is full of nasty escape hatches that cause all sorts of composition problems and unnecessary side effects.)

[1] https://github.com/tc39/proposal-observable

Post reply on HN