Skip to main content
25 events
when toggle format what by license comment
Dec 11, 2018 at 6:00 history tweeted twitter.com/StackSoftEng/status/1072370480580050944
Dec 8, 2018 at 11:34 comment added Bakuriu @Gherman Overloading on return type is possible (see Haskell) but significantly complicates type inference. See for example this question. By disallowing it the type inferencing can go "in one direction" which is easier to implement, to implement correctly and it is faster. Most languages have decided that overloading on return type is not worth it hence the async in the name is not a tautology for the compiler.
Dec 7, 2018 at 13:24 comment added Bradley Uffner Is the "Async" suffix on function names still the current recommendation? I thought that this naming convention went out of style fairly quickly after async / await came in to the mainstream.
Dec 7, 2018 at 9:13 comment added Jeroen Mostert @Gherman: because C#, like a lot of languages, can't do overloading based on return type alone. You'd end up with async methods that have the same signature as their sync counterparts (not all can take a CancellationToken, and those that do may wish to supply a default). Removing the existing sync methods (and proactively breaking all code) is an obvious non-starter.
Dec 6, 2018 at 15:37 review Suggested edits
Dec 7, 2018 at 3:45
Dec 6, 2018 at 12:56 comment added corentinaltepe Well, the method could simply return a Task without having it to wait synchronously. Async is to be there only if there is an await in the method. Still, this is tautology.
S Dec 6, 2018 at 12:47 history suggested Peter Mortensen CC BY-SA 4.0
Copy edited.
Dec 6, 2018 at 9:12 comment added Gherman I wonder why use Async suffix if the function is already denoted to be async with the type it is returning. This is tautology.
Dec 6, 2018 at 7:39 vote accept corentinaltepe
Dec 6, 2018 at 7:39 vote accept corentinaltepe
Dec 6, 2018 at 7:39
Dec 6, 2018 at 7:00 review Suggested edits
S Dec 6, 2018 at 12:47
Dec 5, 2018 at 17:21 comment added Ant P Async and sync processes are fundamentally different in behaviour - this is not unique to C# or async/await. The idea that you can arbitrarily abstract away properties of a system is false and is a dangerous assumption that leads to lots of poor design and overengineering.
Dec 5, 2018 at 17:03 comment added usr Yes, this is a significant downside to using async. In my opinion, this downside is widely underestimated in the community.
Dec 5, 2018 at 15:44 answer added Walfrat timeline score: 0
Dec 5, 2018 at 12:58 answer added Matthieu M. timeline score: 114
Dec 5, 2018 at 11:16 answer added Ewan timeline score: 2
Dec 5, 2018 at 10:49 comment added Doc Brown @Euphoric: sounds like a good basis for a non-opinionated answer ;-)
Dec 5, 2018 at 10:47 comment added Euphoric @DocBrown I think the deeper question here is "Can part of system be changed from synchronous to asynchronous without parts that depend on it also having to change?" I think the answer to that is clear "no". In that case, I don't see how "concepts of good architecture and layering" apply here.
Dec 5, 2018 at 10:07 comment added Doc Brown @Euphoric: I think the problem scetched here goes deeper than the C# guidelines, that's just a symptom of the fact that changing parts of an application to asynchronous behaviour can have non-local effects on the overall system. So my gut tells me there must be a non-opinionated answer for this, based on technical facts. Hence, I encourage everyone here not to close this question too early, instead let us wait what answers will come (and if they are too opinionated, we can still vote for closing).
Dec 5, 2018 at 9:58 answer added max630 timeline score: 83
Dec 5, 2018 at 9:30 review Close votes
Dec 11, 2018 at 3:05
Dec 5, 2018 at 9:16 answer added Neil timeline score: 6
Dec 5, 2018 at 8:42 comment added Euphoric While this sounds like a great discussion question, I think this is too opinion-based to be answered here.
Dec 5, 2018 at 8:25 review First posts
Dec 5, 2018 at 12:47
Dec 5, 2018 at 8:22 history asked corentinaltepe CC BY-SA 4.0