Xcode-beta (7A121l): print() is broken, utterly broken

Originator:owensd
Number:rdar://21577485 Date Originated:26-Jun-2015 09:37 PM
Status:Open Resolved:User Errorish
Product:Developer Tools Product Version:Xcode-beta (7A121l)
Classification:Serious Bug Reproducible:Always
 
Update: this is the root cause of this bug: http://www.openradar.me/21577729.

--

Ok, this ended up being mostly my fault:

 print("━", appendNewLine: false)

vs

 print("━", appendNewline: false)

However, it shouldn't have compiled as appendNewLine is the incorrect label. In fact, if you use the print() overload that takes a stream as an input, you get the proper error. That is how I noticed it in the first place.

-- 

First of all, I’m sure this bug has been logged before, but I don’t care because this is so flipping irritating right now. 

A “systems language” that has no proper ability to write console apps and output text to the screen succinctly is just broken. The move to replace print() and println() with a single function print() with an overload - terrible decision.

Ok… breathe… I can deal, it’s just an overloaded function now, no problem…

Imagine your surprise when you try and use it to print out some table headers:

        for  _ in 0 ..< titleWidth { print("━", appendNewLine: false) }
        print("╇", appendNewLine: false)

And you get output like this in the console:

("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("━", false)
("╇", false)

This is retarded and completely broken. Please change print() back to the proper print() and println() versions and fix the implementation to actually output correctly to the screen.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!