<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">My original post from yesterday, which describes the way that I am using set-only properties in Swift, still has not gotten through; attempting again:<div class=""><br class=""></div><div class=""><div class="">I use set-only properties very, very often. I am interested to know&nbsp;how ubiquitous functions that begin with “set” are, in  frameworks. I’m currently under the impression that people usually don’t recognize that they could be using a setter, instead of a function, due to those frameworks, coming from a respected source, causing them to believe that the practice is reasonable.</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(144, 45, 208);">/// Use this as the getter for set-only properties,&nbsp;</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(144, 45, 208);">/// until Swift has real set-only properties.</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(144, 45, 208);">///-&nbsp;<span class="" style="color: rgb(0, 144, 81);">Important</span>: Causes a fatal error, logging the name of the property.</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; color: rgb(144, 45, 208);">///-&nbsp;<span class="" style="color: rgb(0, 144, 81);">Parameter</span>&nbsp;propertyName: Never use this; only use the default.</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(187, 44, 162);">@noreturn</span>&nbsp;<span class="" style="color: rgb(187, 44, 162);">public</span>&nbsp;<span class="" style="color: rgb(187, 44, 162);">func</span>&nbsp;setOnlyPropertyGetterError(propertyName:&nbsp;<span class="" style="color: rgb(112, 61, 170);">String</span>&nbsp;=&nbsp;<span class="" style="color: rgb(187, 44, 162);">__FUNCTION__</span>) {</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;">&nbsp;&nbsp;&nbsp;<span class="" style="color: rgb(61, 29, 129);">fatalError</span>(<span class="" style="color: rgb(209, 47, 27);">"</span>\<span class="" style="color: rgb(209, 47, 27);">(</span>propertyName<span class="" style="color: rgb(209, 47, 27);">) is set-only"</span>)</div><div class="" style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;">}</div></div></div></body></html>