Live data from Hacker News

The Svelte Compiler Handbook

lihautan.com

61–70 of 139 posts

Re: The Svelte Compiler Handbook

#61

How did Rich Harris, a "graphics editor," write Svelte? So many designers hardly know JavaScript at all. This one wrote one of the most advanced JavaScript frameworks I've ever seen. It's not just JavaScript. He wrote a compiler that takes a custom, declarative syntax and converts it to imperative JavaScript to surgically update the DOM.

Funny you mention this, Evan You, the author of VueJS was a graphic designer before writing VueJS

I wonder if they have more interest in UX than most people, and that gave their frameworks the edge.

Re: The Svelte Compiler Handbook

#62
post #31

Earlier quoted context omitted.

I'm actually working on one. I don't know what will come out of it, but it's an interesting endeavor. As soon as it's shareable I will share it on Github. I'm basically trying to do a superset of typescript where you create elements so: const root = c({ el: 'div', children: [ `hello, ${store.user.name}` ], attr: { class: 'bold smart', id: 'abc', bla: true, }, evts: { click: () => { console.log("Clicked") } } }); And…

That is awfully verbose.

What's wrong with being verbose?

Re: The Svelte Compiler Handbook

#63

How did Rich Harris, a "graphics editor," write Svelte? So many designers hardly know JavaScript at all. This one wrote one of the most advanced JavaScript frameworks I've ever seen. It's not just JavaScript. He wrote a compiler that takes a custom, declarative syntax and converts it to imperative JavaScript to surgically update the DOM.

Lot of smart people who are not selling their soul to empower companies to:

- track people and systematically destroy privacy forever

- trick kids into clicks via what should be illegal recommendation algorithms

- use their insanely talented minds to work in advertising

Need more diversity in tech. This should be encouraged vs gulping down the big fat framework FB tells you to

Re: The Svelte Compiler Handbook

#64
post #3

Having a hard time choosing between Svelte and Elm. For a lone in house dev, any recommendations?

I used Svelte 3 for a fairly complex side project last year (rewrote it from React), and it's my favorite JS framework so far. I do wish the TypeScript story was better though.

I've also used Elm for another little side project, and it was super fun to learn, but it was a bit mind-bending at first.

I think Svelte is a fairly safe choice because it's actively developed and because it's not too different from Angular/React/Vue.

If there's any possibility that you'll have to hand this code over to someone else, I think Elm is a much less safe choice.

So, to echo tomerbd's reply: Elm for fun; Svelte for profit.

Re: The Svelte Compiler Handbook

#65
post #3

Having a hard time choosing between Svelte and Elm. For a lone in house dev, any recommendations?

I'd say Svelte is much closer to "regular" programming. You will have to bend your thinking a bit with Elm. Svelte seems great, but it seems to be developed by one person primarily. Also, that person lives in NY and the project looks paused at the moment.

By "regular" programming do you mean JavaScript?

Re: The Svelte Compiler Handbook

#66
post #3

Having a hard time choosing between Svelte and Elm. For a lone in house dev, any recommendations?

While I primarily use Elm for all my front end side projects, I do think it's worthwhile to try both.

I'm currently writing a blog about trying as many front end frameworks/languages as I can. I'm going with this approach because I want to see what I can learn from each of them. For example, I've learned from Elm that compilers can be much friendlier. I've learned from Svelte that people are more willing to accept what appears to be familiar.

You may learn something completely different.

Re: The Svelte Compiler Handbook

#67
post #64
post #3

Having a hard time choosing between Svelte and Elm. For a lone in house dev, any recommendations?

I used Svelte 3 for a fairly complex side project last year (rewrote it from React), and it's my favorite JS framework so far. I do wish the TypeScript story was better though. I've also used Elm for another little side project, and it was super fun to learn, but it was a bit mind-bending at first. I think Svelte is a fairly safe choice because it's actively developed and because it's not too different from Angular/R…

Just a reminder that Svelte, in Rich Harris's own words, is a language and not a framework. It technically isn't JavaScript, just an incredibly similar syntax.

Re: The Svelte Compiler Handbook

#68

How did Rich Harris, a "graphics editor," write Svelte? So many designers hardly know JavaScript at all. This one wrote one of the most advanced JavaScript frameworks I've ever seen. It's not just JavaScript. He wrote a compiler that takes a custom, declarative syntax and converts it to imperative JavaScript to surgically update the DOM.

He have also written Ractive.js and Rollup.js. From what I've seen Harris doesn't only "know JavaScript" but have a better _vision_ about its future than most, a lot of cool ideas and the skills to try them.

Re: The Svelte Compiler Handbook

#69

How did Rich Harris, a "graphics editor," write Svelte? So many designers hardly know JavaScript at all. This one wrote one of the most advanced JavaScript frameworks I've ever seen. It's not just JavaScript. He wrote a compiler that takes a custom, declarative syntax and converts it to imperative JavaScript to surgically update the DOM.

He probably was interested in it. Not everyone has a traditional background or even day job in the area they're passionate about. One of our neighbours growing up in a small village was a nice old retired man who barely had any formal education, years later I found out he was publishing original maths research online. There's also a guy from Finland who IIRC was a bus driver who is putting great C++ low level graphics and retro programming content on Youtube.

Lots of under-recognised talent is eveywhere.

Re: The Svelte Compiler Handbook

#70

I like Svelte very much. My biggest struggle is with tooling, especially the lack of proper IDE support. I know there are several IDEs with plugins for Svelte, but they're either obsolete or lacking essential features. That's why I won't use it for me next project, just not worth it going against the wind. Now, I am looking at Flutter. Seems to match my needs, and it's also actively maintained. Never underestimate th…

Svelte support in the Jetbrains family of tools is great (IDEA, Webstorm etc). There are a few issues, but they're all minor. Started using Svelte for serious work a few months ago, very happy with it, best frontend framework I've worked with thus far.
Post reply on HN