tcomb icon indicating copy to clipboard operation
tcomb copied to clipboard

Default value

Open piranna opened this issue 7 years ago • 2 comments

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.

piranna avatar Feb 15 '18 11:02 piranna

Sounds reasanoble.

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

ArmorDarks avatar Mar 06 '18 15:03 ArmorDarks

I'm glad you liked my suggestion :-)

piranna avatar Mar 07 '18 01:03 piranna