Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ZioCain26674y@alexbrooklyn well, weak typing means a variable can be anything, but some methods require parameters to be of a specific type and therefore you always have to check what kind of var it is.
As for callbacks, it's really messy to understand what's going on when you're working with callback, thread and so on -
@alexbrooklyn Come on, you don't want to open the debate on weak typing again surely 😉
-
@AlmondSauce fuck weak typing I want to know about the callbacks :p
(I should have been more specific) -
@ZioCain
If you're coming from a js or single threaded background it can be a bit confusing.
If you're looking for promises. The analogue you're looking for is continuations. Task has a ContinueWith method that accepts a function that lets you unroll the result of a task. Also has facilities to control things like schedulers (how the work is executed, synchronized), timeouts and cancellation of observation/operation.
Async await functions in a semantically identical way with tasks as is does with promises in js, because .net popularized it as a control flow mechanism, courtesy of erik meijer.
It is however all built on top of the thread ecosystem. It may help to read up on the differences between threads and green threads.
https://en.m.wikipedia.org/wiki/...
https://en.m.wikipedia.org/wiki/...
Related Rants
-
InvisibleMe21"Pythonists don't comment, they write readable code." Yea, tell that to the list comprehension with three lam...
-
ddash1237The best motivation to quit Image Classification... x_x
-
NoMad8Assembly... Do I really need to say more? Okay, it's low level so there is no abstraction. All you deal with ...
Well I program in PHP, JS and C#.
Weak typed variables are literally the worst thing ever.
In C# I particularly hate the way callback as handled
rant
wk239