<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div class="bloop_sign" id="bloop_sign_1484173883282977024"><div style="font-family: helvetica, arial;"><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Hi Guys,</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">i just stumbled over this different behavior between Mac and Linux:</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">MacOS Sierra 10.12.1 Swift 3.0.2 REPL</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"> 1> import Foundation</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"> 2. let nf = NumberFormatter()</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"> 3. print(nf.string(for: (Double("1")?.rounded()) as Any) as Any)</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"> 4. print(nf.string(for: (Double("1")!.rounded()) as Any) as Any)</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Optional("1")</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Optional("1")</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">On Linux (<a href="http://swiftlang.ng.bluemix.net/#/repl/5876ac525784322e15d09920">http://swiftlang.ng.bluemix.net/#/repl/5876ac525784322e15d09920</a>) the same code prints</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">nil</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Optional("1“)</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Is this a feature or a bug? Can anyone explain this?</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Thanks for you help!</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;"><br></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px;">Krystof Beuermann</div></div></div></body></html>