News for hackers. Stuff that matters.
Re:Why Go and Not Rust? by dsirola on Monday September 16, 2019 @05:16PM (#20988647)
You can mess up async/await in C# in exactly 0 ways. Calling .Result is just a bad practice and should never be done.
Re:Why Go and Not Rust? by naikrovek on Monday September 16, 2019 @08:26PM (#20989933)
Uhh, I've messed it up a lot more ways than zero, and it's easy to do. In fact, doing the exact same thing in a console app and a Windows Forms app will result in a deadlock in one of them, for absolutely no obvious reason.

Async and await in C# may be wonderful to some, but they are horribly broken to others.

Re:Why Go and Not Rust? by Const-me on Tuesday September 17, 2019 @02:22AM (#20992203)
I agree there're caveats, I experienced that too.

I disagree they're broken.

C# 7.1 introduced async main. No reason to call Task.Result in console programs.

Even before that feature arrived, visual studio debugger could resolve that literally in a minute. Press F5, reproduce deadlock, you'll see exactly what's locked and why.