[Mercury Feature request] Simple properties

In VB the Property syntax is:

Property MyProp As Type
    Get
        'Get code
    End Get
    Set (value As Type)
        'Set code
    End Set
End Property

The shorthand (only when there is just a storage field involved):

Property MyProp As Type

I would propose a shorthand with a getter and a setter:

Property MyProp As Type Get VarOrFunction Set VarOrSub

To use a function or sub in this syntax, you have to conform to:

  • The get function needs to return Type and does not take any parameters
  • The set sub takes one parameter of Type