Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Default value #309

Open
piranna opened this issue Feb 15, 2018 · 2 comments
Open

Default value #309

piranna opened this issue Feb 15, 2018 · 2 comments

Comments

@piranna
Copy link

piranna commented Feb 15, 2018

So far I've seen it's only possible to define default values on the structs, but there's no possibility in other types. One option would be to add an optional default value to the maybe function, so if a value is not defined or is null, the default is returned.

@ArmorDarks
Copy link

Sounds reasanoble.

It also will help to avoid duplicating structure in structure itself and than it's "defaults" declaration.

@piranna
Copy link
Author

piranna commented Mar 7, 2018

I'm glad you liked my suggestion :-)

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

No branches or pull requests

2 participants