79321681

Date: 2025-01-01 13:43:06
Score: 1.5
Natty:
Report link

Speaking purely technically, no, this is not supported in Swift.

If you do really want to achieve this, you can approach it in the following way:

Read Only

var content: String {
    return m.content
}

Read/Write

var content: String {
    get {
        return m.content
    }
    set {
        m.content = newValue
    }
}

All of this though, should have you asking, do you really NEED to do this? Does this really give you anything that just accessing m.content directly wouldn’t already give you?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Brandon Stillitano