3 ms·
That is where I disagree completely. I think the old fashioned sync/blocking/threaded style is much easier than async. Of course, C# has great async support; b
by zhong-j-yu 12y ago
That is where I disagree completely. I think the old fashioned sync/blocking/threaded style is much easier than async.
Of course, C# has great async support; but it is still a complicate thing that programmers must be very cautious about when applying.
- fleitz 12y agoI don't think you've seen truly great async support, it's virtually indistinguishable from sync code. Sync: let file = File.Open("foo.txt") let data = file.Read(8192) // Do some compute stuff with data ASync: let! file = File.OpenAsync("foo.txt") let! data = file.ReadAsync(8192) // Do some compute stuff with data
- zhong-j-yu 12y agowhile the syntax can be as simple as that, there is still a difference, and the programmer still needs to be very careful. what if you accidentally forget the `"!"`?
- fleitz 12y agoUmm... it doesn't compile because it's the wrong type... But yeah multithreading is easy.