RFC #17: Readonly interface fields #21
ProCode-Software
started this conversation in
RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
writable/writekeyword that can be applied on fields, similar toreadonlyon structs. The downside is that is another keyword, when we already havereadonly.readonlycan be used to override.setFoo()).Note that requiring fields to be writable makes the interface harder to implement. If a struct has a field
readonly foo, it can't implement any interface that requiresfoo. Option B implicitly makes this too restrictive.All reactions