Default values for type(object) fields

2022-06-07 Thread TKD
Thanks. These are very useful.

Default values for type(object) fields

2022-06-07 Thread TKD
Thanks for this. I will use this in the interim whilst the RFC is being worked on.

Default values for type(object) fields

2022-06-07 Thread xflywind
See also which supports default values for fields using macros.

Default values for type(object) fields

2022-06-07 Thread TKD
Excellent. I will subscribe to the PR. Thanks.

Default values for type(object) fields

2022-06-07 Thread TKD
I was just coding up an object that theoretically should have about 50 fields with well-defined initial values. Then, I found out that Nim does not support initial values for type (object) fields, e.g., type Foo = object a: float = 11.0 # Error b: float = 0.00

Default values for type(object) fields

2022-06-07 Thread Yardanico
The RFC about this is accepted, and there's a WIP PR by flywind already.

Default values for type(object) fields

2022-06-07 Thread Zoom
See these RFCs: