Hacker News new | ask | show | jobs
by pcattori 1235 days ago
The manifest is an artifact produced by the browser compilation, but it can be shared _before_ the browser compilation writes its results to disk.

I _could_ refactor to have "browser compilation phase 1", then assets manifest, and then "browser compilation phase 2", but that's not how I model it in my head. Plus it would mean a diverging interface for `compileBrowser` and `compileServer` which doesn't fit my mental model either.

So prefer to use channels instead.

1 comments

> but that's not how I model it in my head.

I think this is the central matter when it comes to primitives for asynchronous programming.

There exist many ways we can think about async tasks. The JavaScript ecosystem provides for multiple. i.e., event callbacks, async/await, generators, and more.

Programmer reach for tools which best match how we have learned to model these problems in our heads.

It's okay for people to use what works best for them.