4 ms·
I understand the author's claims to be "Svelte makes it hard to debug the compiled code, compared to plain-old uncompiled JavaScript" and "the Svelte runtime ar
by rgoulter 7y ago
I understand the author's claims to be "Svelte makes it hard to debug the compiled code, compared to plain-old uncompiled JavaScript" and "the Svelte runtime architecture makes it harder to observe the system as a whole, so debugging is harder".
I think the article would benefit from specific examples of where this caused a problem, and if e.g. whether the claim about "compiled code hard to debug" applies to Svelte in a way that it doesn't apply to TypeScript, Babel, etc.
- chrismorgan 7y agoThe likes of TypeScript, Babel and JSX are providing a simple source-to-source transformation that leaves the structure untouched, broadly just changing the exact syntax employed. (I exclude any transformation of async code to not use async/await syntax; that one is a more involved transformation.) Svelte is not like that. It’s unequivocally a compiler, doing much more involved transformations. If reactivity becomes involved in your debugging efforts, it can indeed be harder to pin down than in plain old JavaScript—depending on how that JavaScript was written, of course. Compared with the likes of React? I have no real idea, I’ve never used React seriously. If the issue gets involved with the depths of React or Svelte, remember that there’s a lot less of Svelte, which may make it easier to debug. But for some of the sorts of problems that could occur, I would expect React to be easier to debug, because the bit that’s your code is essentially just plain JavaScript. For myself, I choose to use Svelte.
- Glench 7y agoAgree with parent comment. I don’t get the sense from reading the article that the author even used Svelte much — it sounds more like they just read the marketing.
- marcofatica 7y agoI would put real money on a bet that the author did not ever try it, and has never ran into those issues, and is simply speculating