<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=""><div class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0068-universal-self.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0068-universal-self.md</a></div><div class=""><br class=""></div><div class="">It's dangerous to go alone. Take this with you. </div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On May 22, 2016, at 12:24 PM, Adam Nemecek via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">What do you guys think about aliasing the type of the current object with the Self keyword? </div><div class=""><br class=""></div><div class="">E.g. instead of writing </div><div class=""><br class=""></div><div class="">class Test {</div><div class=""> static var value = 0</div><div class=""> </div><div class=""> func printValue() {</div><div class=""> print(Test.value)</div><div class=""> }</div><div class="">}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">One could write </div><div class=""><br class=""></div><div class="">class Test {</div><div class=""> static var value = 0</div><div class=""> </div><div class=""> func printValue() {</div><div class=""> print(Self.value)</div><div class=""> }</div><div class="">}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>