Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here `a` and `b` can have different types:

    let! a = fetchA() and! b = fetchB()
Whereas `Promise.all` usually requires all promises to have the same type (returning a `List<T>` or even a `List<obj>`) .

See https://learn.microsoft.com/en-us/dotnet/fsharp/whats-new/fs...



Actually, TypeScript's `Promise.all` can handle different types too.

    const [a, b] = await Promise.all([fetchA(), fetchB()]); // => a: A, b: B


I am talking about C# / F# context where the lists must have homogeneous types.

That TypeScript supports this is yet more complexity introduced to cover usages of an API not designed around types.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: