Comment by cies

3 months ago

That's a lot of goodies in a new release! It seems it is outpacing the JVM's development...

Apart from [the equivalent of] records, I see nothing big.

Except...

this '''let! a = fetchA() and! b = fetchB()''' really puzzles me. Does C# have a high-level syntax for concurrency timing? [something that Java is strongly lacking, and that Typescript did solve with Promise.all(), which is an ugly syntax, from my perspective]

Any elaboration on this is very welcome.

  • The inlining and escape analysis changes are fairly big from a performance perspective.

    Also, C# doesn't need nearly as many massive changes like project Valhalla because they got a lot of those design choices right from day 1 (mostly by looking at what Java did that was dumb and avoiding it).

  • Java has had CompletableFuture::allOf for a long time. The new structured concurrency api also has the same capabilities of waiting for futures.

  • As others point out, that's F#, but yes C# has `async`/`await`, and has all the `Promise` methods, just under the `Task` class instead (and with slightly different names/calling conventions through out).