News for hackers. Stuff that matters.
Re:Show HN: Sapper.js – towards a better web app framework by skrebbel on Tuesday January 02, 2018 @11:55AM (#16053153)
I've been following Rich's work on Rollup, Svelte and now Sapper with interest and great awe. I truly believe he's onto something.

At the same time, if I were designing something like this, I'd use a tool like Flow or TypeScript in a heartbeat. Doing AOT optimization is so much easier when you have type guarantees, I'm sure that once you go deep enough you get into all kinds of little issues that are only issues because JS is both dynamic and very quirky.

Rich, if you're reading this, did you consider this and if so, why not?

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Tuesday January 02, 2018 @11:57AM (#16053173)
Thank you.

Svelte itself is written in TypeScript so I'm a believer. I'd like to get first-class support for TypeScript in components at some point. Adding .ts support for the non-component parts of a Sapper app should be fairly straightforward (it's just a webpack config after all) — will add that to the TODO list.

Re:Show HN: Sapper.js – towards a better web app framework by nikcub on Tuesday January 02, 2018 @07:00PM (#16057102)
> Svelte itself is written in TypeScript

I completely missed this as I looked at the sample project and saw js files - this has me going back and taking a second look, so you might want to mention it.

Re:Show HN: Sapper.js – towards a better web app framework by stephen on Tuesday January 02, 2018 @11:10PM (#16058305)
Curious, but since you're a TypeScript believer, and venturing into "build yet another JS framework", why not make it TypeScript-first or even TypeScript only?

Granted, you'd loose a large number of JS-only potential users, but seems like it'd be very differentiating (and unique?) to be TS-first, and market/specialize within the large niche of TS developers/teams.

Vs. the usual TS-last/TS-kinda-sorta approach that, again AFAICT, all the other JS frameworks take.

Re:Show HN: Sapper.js – towards a better web app framework by rich_harris on Wednesday January 03, 2018 @08:36AM (#16060810)
Learning a new framework is intimidating enough without potentially having to learn a new language on top of it. I work in the news business, among people who in many cases learned the bare minimum of JavaScript necessary to visualise data and tell interactive stories, so that's my natural constituency — beginner-to-intermediate/casual programmers, most of whom don't even know what TypeScript is.

There are TS-first frameworks, such as Angular, and they're off-putting to people who just want to build something.

Re:Show HN: Sapper.js – towards a better web app framework by alexhayes on Tuesday January 02, 2018 @03:51PM (#16055494)
Couldn't agree more on the praise for "Rollup, Svelte and now Sapper". Well done Rich, keep going!!!