Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Use Option[] for optional parameters except collections" wanted #14

Open
plokhotnyuk opened this issue Jun 16, 2020 · 1 comment
Open

Comments

@plokhotnyuk
Copy link

Currently there are 3 options:

  • Use Option[] for optional parameters
  • Use Option[] for all parameters
  • Do not use Option[]

Could you please add 4th one to avoid wrapping collections to Option[] for class fields because a lot of JSON parsers for Scala can handle missing values for them using empty collection instances.

@cchandurkar cchandurkar transferred this issue from another repository Feb 21, 2021
@wajda
Copy link

wajda commented Aug 11, 2022

That would be useful. Some(Seq.empty) and None often has the same meaning, so such duality introduces ambiguity in processing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants