News for hackers. Stuff that matters.
Re:I'm Betting on Call-by-Push-Value by erik_seaberg on Saturday March 09, 2024 @07:15PM (#39655681)
Not sure I see a difference between thunks and futures.
Re:I'm Betting on Call-by-Push-Value by iso8859-1 on Saturday March 09, 2024 @07:39PM (#39655817)
Thunk is a general concept of a small function which is used only to adapt the call or prepare/modify it in some way and then redirect to the proper function. Things like promises, futures, closures, wrappers, stubs or implementations of the concept of virtual function tables in some OO languages (like C++) are just special use cases of thunks (thunks are often used to implement them).

Source: https://stackoverflow.com/a/22548372/309483

Re:I'm Betting on Call-by-Push-Value by soulbadguy on Saturday March 09, 2024 @07:49PM (#39655860)
The definition that the source is using seems wrong to me. Promise,futures and closures are not used to redirect to anything or wrapper around something else... They are proper compationational object with they own behaviors...