News for hackers. Stuff that matters.
Re:On the proliferation of try, and soon, await (2020) by jlokier on Thursday August 26, 2021 @04:57PM (#28320632)
Or you can have a language where the implied `await` is delayed until the information is used, but the initiation starts as soon as the information required to initiate is ready:

  asset1 = httpGET(...)
  asset2 = httpGET(...)

  doSomethingWith(asset1)
  doSomethingWith(asset2)
No problem, both requests concurrent, don't have to think about it. They will probably be neatly batched by the executor into a single outgoing TCP packet too.

  asset1 = httpGET(...)
  asset2 = httpGET(functionOf(asset1))

  doSomethingWith(asset2)
Second request has to wait until the first has completed, because this is correct. It can't be started until the first is completed.

There are no comments on this comment yet.