News for hackers. Stuff that matters.
Re:You Don't Need to “Learn” Svelte: Embracing the Simplicit... by ahipple on Monday September 04, 2023 @11:48AM (#37381617)
Sure -- I did run that code in a JS REPL and saw that it invoked the block immediately, but that isn't necessarily what I want if I'm writing reactive code. I then tried typing `break $` and `continue $` and got SyntaxErrors for my trouble, confirming my hypothesis that this couldn't be plain JavaScript of the sort I was familiar with.

> It's invoked whenever a named variable that is mentioned in the block is explicitly assigned to.

This makes sense in the sense that it's a contract that I can accept and use, but it does imply the existence of a parsing pipeline & runtime of unknown (to me) complexity & capabilities -- exactly the sort of thing a prospective user of the framework would need to learn about sooner or later.

Re:You Don't Need to “Learn” Svelte: Embracing the Simplicit... by Tade0 on Monday September 04, 2023 @12:27PM (#37382019)
Well, yeah - there's a reason why it's called a framework-compiler.

In any case you can always just look into the unminified output where you'll see how your code is instrumented - it even includes comments detailing which variables are being dirty-checked.