K.
K.
Explore posts from servers
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
yea, true.
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
I miss the true functional stuff from F# in C# still, I hope they make progress there
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
Pobiega, we have been talking on discord once about rust, right?
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
i think in C# its still pretty good
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
Thats some cases where I would use it
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
I have been using it so far from time to time to define cases where I have one object but it has different states, so its not null or T but rather 'LOADING' | T | 'UNDEIFNED'.
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
in typescript you can use string as type directly making it quicker to write
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
idk I like it 😄
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
also true
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
in my oppinion in result type you dont expect as you do expect then 'throw' cause its typesafe
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
yea expecting is the right word
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
😄
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
im on vacation
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
ok
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
also its more efficient then throwing errors cause throwing errors is expencive
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
The advantage is that you will have it in a typesafe way and it will not be possible that you dont cache an error, cause you have to match all possible cases.
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
the idea is that you can return you base default result which is T or you return some other which is another class which represents an error. Then you don't need to rethrow the errors but rather you expect always the posibility that its the result or some possible error results
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
Discriminated unions are in typescript defined like this: const myType: string | number = "some string but could have been a number as well"; myType = 5;
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
Its about discriminated unions being possibe to be used in C# in a hacky way - the library is however pretty polished and you wont notice it.
129 replies
CC#
Created by Shinigami on 9/28/2023 in #help
✅ why IActionResult and why not ActionResult?
129 replies