Hacker News new | ask | show | jobs
by mike_hearn 1174 days ago
A quick response:

1. Deserializing stuff in a service worker then requires it to be moved across to the main UI thread but you can't share the objects, right? It's message passing.

2. We're comparing to 'native' apps, right, so memory overhead of common things counts and saying you can use native code isn't really a rebuttal because you can't use it for the UI stuff.

3. We're not talking about how battle hardened they are, but about performance.

4. Meta tags have hardly any impact on the modern web, right? That's why you have to talk about legacy IE, they did try something like that but Chrome has no equivalent.

5. Sandboxing isn't cheap performance-wise, that's my point.

6. TypeScript isn't JavaScript, it's a different language that browsers don't understand.

1 comments

I'll just respond to a couple of these:

1. I don't know if any of the major browsers do this, but one could imagine an implementation of that message passing, between threads or processes on the local machine, that has much lower overhead than deserializing from JSON.

6. If we assume that non-trivial web frontend projects these days always have a build step, then it doesn't matter; TypeScript compilation can be included in that build step.

Sure, and TypeScript is great, but I was talking about HTML rather than HTML plus all the layers people have added on top.

I'm also not totally convinced Typescript actually answers the point in question. It's a superset of JS in the end, and a part of why Java/C# type languages are popular in the enterprise is the list of things you can't do. Adding types can help, but it's not something that TS can enforce.