News for hackers. Stuff that matters.
Re:Rust’s async isn’t colored by SideburnsOfDoom on Thursday March 11, 2021 @06:51AM (#26423039)
> > Every language where you can call an async function as if it was blocking has no colored functions, and none of the issues of it.

So then C# "has no colored functions" despite being the prime example of them, just because there are escape hatches from "async await" in the form of .Result and co?

This seems like an absurd position to take.

Re:Rust’s async isn’t colored by shakow on Thursday March 11, 2021 @08:11AM (#26423585)
> despite being the prime example of them

Quite the opposite, the main target of the original post (https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...) is JS, not C#; which is explicitly described as not having the problem: “In C#, you can use the await keyword to invoke an asynchronous function.”

Re:Rust’s async isn’t colored by SideburnsOfDoom on Thursday March 11, 2021 @12:22PM (#26426509)
That article says

> So JS, Dart, C#, and Python have this problem

The reason why C# _might_ be considered to not have coloured functions is not because "you can use the await keyword to invoke an asynchronous function", it is that, when for whatever reason you cannot use `await`, then there are ways to synchronously call the async code, the simplest being appending `.Result` to the end.

Of course these are not ideal to use, but "escape hatches" to the coloured functions do exist; and yet there are still two "colours" to the functions" - async and not.

it is wrong to say that "C# does not have coloured functions". OK, you can work around this problem. But it's still a problem.