-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Context
During the review of PR #1561, a discussion arose regarding the parameter passing strategy for callbacks in the codebase.
Currently, most of the codebase passes callbacks by value. The PR initially used rvalue references (auto&&) for callback parameters, which offers potential benefits:
- Increased flexibility: Allows callbacks to be not just lambdas, but also objects that hold stateful values
- Efficiency: Using rvalue references allows passing objects into the call and using them later without unnecessary copies
Proposal
Evaluate whether it would be beneficial to update the codebase to consistently use rvalue references for callback parameters instead of pass-by-value.
References
- Discussion: feat(ffi): Add new
EncodedTextAstimplementation usingStringBlob. #1561 (comment) - Related PR: feat(ffi): Add new
EncodedTextAstimplementation usingStringBlob. #1561
Requested by: @LinZhihao-723
Metadata
Metadata
Assignees
Labels
No labels