<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think, it could be a good idea to make computed properties overridable with let constants.<div class=""><br class=""></div><div class="">Something like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(131, 148, 150);" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">class</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Parent {</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">var</span><span style="font-variant-ligatures: no-common-ligatures" class=""> x: </span><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">Int</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> x = </span><span style="font-variant-ligatures: no-common-ligatures; color: #29a198" class="">42</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #586e75" class=""><i class="">/*</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; * Compute x...</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; */</i></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">return</span><span style="font-variant-ligatures: no-common-ligatures" class=""> x</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; }</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div style="margin: 0px; line-height: normal; min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #859901" class="">class</span><span style="font-variant-ligatures: no-common-ligatures" class=""> Child: </span><span style="font-variant-ligatures: no-common-ligatures; color: #b58901" class="">Parent</span><span style="font-variant-ligatures: no-common-ligatures" class=""> {</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #586e75" class=""><i class="">/*</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; * Sometimes you need to override computed properties with simple constants.</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; * This is currently done like this.</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; */</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">//override var x: Int {return 7}</i></span></div><p style="margin: 0px; line-height: normal; min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp;&nbsp; &nbsp;</span><br class="webkit-block-placeholder"></p><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #586e75" class=""><i class="">/*</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; * But this looks neater.</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; * Currently this gives "error: cannot override with a stored property 'x'".</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(88, 110, 117);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><i class="">&nbsp;&nbsp; &nbsp; */</i></span></div><div style="margin: 0px; line-height: normal; color: rgb(133, 153, 1);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures" class="">override</span><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #839496" class=""> x = </span><span style="font-variant-ligatures: no-common-ligatures; color: #29a198" class="">7</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div></div></div></body></html>