     private var cachedName: String??
     public var name: String? {
         get {
-            switch cachedName {
-            case .none:
-                let value = string(forProperty: kMIDIPropertyName)
+            if let value = cachedName { return value }
+            else {
+                let value: String? = self[kMIDIPropertyName]
                 cachedName = .some(value)
                 return value
-            case .some(let value):
-                return value
             }
         }
         set {
             if cachedName != .some(newValue) {
-                set(string: newValue, forProperty: kMIDIPropertyName)
+                self[kMIDIPropertyName] = newValue
                 cachedName = .none
             }
         }

    // TODO sysExSpeedWorkaroundEndpoint and related

}

import Foundation
import CoreMIDI

protocol CoreMIDIObjectWrapper: AnyObject, Equatable, Identifiable {

    var midiClient: SMClient { get }    // TODO This should refer to a protocol too
    var midiObjectRef: MIDIObjectRef { get }
