Ticket #322 (new enhancement)
Opened 11 years ago
Support immutable/readOnly on class decl
Reported by: | hopscc | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.3 |
Keywords: | Cc: |
Description
Support 'is readonly' modifier at a class level declaration.
Its effect is to make any all var fields as if they had each been specified with 'is readonly' which means that these var values can only be specified or changed at point of declaration or in the classes constructor.
Net effect is to provide convenience decl of a simply specified immutable class.
see Discussion:Does cobra have special syntax for immutable types
Note: See
TracTickets for help on using
tickets.