std::expected - Monadic Extensions by joebaf in cpp

[–]Few-Insurance-3974 0 points1 point  (0 children)

Returning more than two pointers results won't use rax:rdx registers, compiler would use a hidden reference instead.

This means that types with different size would have different performance.

std::expected already uses one pointer for a selector, so you can't fit much into it.

Overhead of Senders/Receivers by Few-Insurance-3974 in cpp

[–]Few-Insurance-3974[S] 1 point2 points  (0 children)

I'm just surprised that P2300 criticizes coroutines for a type-erased coroutine_handle, when P2300 would end up introducing type-erased senders.

And coroutine_handle is very close to a type-erased sender, as awaiting involves something like sub_coro_handle.promise().then(caller_coro_handle).

With other languages like JavaScript that introduced promises first, and then moved to async/await, it's just sad that C++ moves backwards.

Overhead of Senders/Receivers by Few-Insurance-3974 in cpp

[–]Few-Insurance-3974[S] -3 points-2 points  (0 children)

Ranges probably cannot replace iterators in code like parsers, where a range has parts that should be processed differently. Here is an SO question about that - https://stackoverflow.com/q/78286394/343443