I'd love to have the option to supply required fields of a struct as args to the first method call (basically deriving a new method), leaving optional ones as separate methods you would then be able to call. This would also mean you should't have to call .build() at the end of the chain, because the data structure is valid 'from the get-go'. This would be great, as currently I use derive-new for when I have a simple struct and can't be bothered to write the new function, but having this built into bon would be much nicer as setters for optional methods would be derived too.
A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.
I'd love to have the option to supply required fields of a struct as args to the first method call (basically deriving a
newmethod), leaving optional ones as separate methods you would then be able to call. This would also mean you should't have to call.build()at the end of the chain, because the data structure is valid 'from the get-go'. This would be great, as currently I usederive-newfor when I have a simple struct and can't be bothered to write thenewfunction, but having this built into bon would be much nicer as setters for optional methods would be derived too.A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.