3 ms·
> I thought the author had lost his mind Quite possible. This was a journey! https://tripleodeon.com/2022/01/software-without-compromise/ https://tripleodeon.c
by jamesgpearce 5y ago
> I thought the author had lost his mind
Quite possible. This was a journey! https://tripleodeon.com/2022/01/software-without-compromise/ https://tripleodeon.com/2022/01/software-without-compromise/
When I first started thinking about this project, classes still meant a bunch of transpilation overhead (which dates the origin story!). I persuaded myself that plain old objects with TypeScript interfaces would strike a better balance between performance, size, and developer experience.
So I ended up with a pattern like:
const longMethod1 = () => {...};
const longMethod2 = () => {...};
return {longMethod1, longMethod2};
These 'methods' can still call each other by name, and it minifies like a champ.