#State as Functions | Dagger

1 messages ยท Page 1 of 1 (latest)

mild gulch
#

If I removed the Greeting param from the constructor, dagger does not populate the default solely from the struct field pragma, so it seems that the struct fields pragmas are redundant ?

pulsar crane
#

Yes +default on the struct field is redundant, I think that's a doc error. +private is specific to fields, and correct

mild gulch
#

Thanks that answers my question!

pulsar crane
#

(side note, it would be cool if the engine could expose a default constructor from just the fields, since 99% of times when I manually write a constructor, it's the same boilerplate every time... In that case a +default pragma on the field would actually be useful ๐Ÿ™‚

#

cc @vast osprey @ornate cedar ๐Ÿ˜‡

mild gulch
#

Fair