Why do all option builder structs take Buffer or Window arguments by moving? #199
dasupradyumna
started this conversation in
General
Replies: 1 comment 1 reply
-
The bodies of the functions you pass There were talks of making |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, if I create a buffer / window and want to set options, create autocommands and commands, then when I use the corresponding option builder structs for building the option structs, I noticed that
Buffer
andWindow
are moved into thebuffer()
andwin()
methods. So I have to useclone()
every time I want to use these.What is the motivation behind moving them and not passing them as a reference?
I believe passing them as references would simplify the user API. Are there any demerits to this?
Beta Was this translation helpful? Give feedback.
All reactions