<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=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="post-text" itemprop="text" style="margin: 0px 0px 5px; padding: 0px; border: 0px; width: 660px; word-wrap: break-word; line-height: 1.3;"><p style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; margin: 0px 0px 1em; padding: 0px; border: 0px; clear: both;" class="">Should I use private or fileprivate to declare global variables/consts in Swift 3? e.g.</p><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">fileprivate let a = 1</span></font><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">fileprivate </span></font><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">class</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">SomeClass</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">{</span></div><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class=""> fileprivate b </span></font><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">=</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">0</span></div><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">}</span></font></div><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class=""><br class=""></span></font></div><p style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; margin: 0px 0px 1em; padding: 0px; border: 0px; clear: both;" class="">or</p><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">private let a = 1</span></font><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">private </span></font><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">class</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">SomeClass</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">{</span></div><div class=""><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class=""> fileprivate b </span></font><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">=</span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class=""> </span><span style="font-size: 15px; color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;" class="">0</span></div><font color="#242729" face="Arial, Helvetica Neue, Helvetica, sans-serif" class=""><span style="font-size: 15px;" class="">}</span></font></div><div class=""><br class=""></div><div class="" style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(48, 51, 54);">Thanks!</span></code></div><div class="" style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(48, 51, 54);"><br class=""></span></code></div><div class="" style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(48, 51, 54);"><span style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" class="">If they are identity, then I think the Swift team should tell us which is better.</span></span></code></div><div class="" style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px;"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;" class=""><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(48, 51, 54);"><span style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></span></code></div></div></div></div></body></html>