News for hackers. Stuff that matters.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by MaxGabriel on Wednesday July 25, 2012 @11:00PM (#4294165)
Any idea why literal syntax would only be for OS X?
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by hboon on Wednesday July 25, 2012 @11:29PM (#4294267)
Pretty sure the release note is incorrect.

I just tried and it works. Also search for "Objective-C Feature Availability Index" in the docs.

Re:Xcode 4.4 is available (for Lion and Mountain Lion) by ryanpetrich on Wednesday July 25, 2012 @11:28PM (#4294266)
I requires runtime support that hasn't yet shipped on a public version of iOS.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by hboon on Wednesday July 25, 2012 @11:29PM (#4294270)
Isn't it a compile time feature?
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by msbarnett on Thursday July 26, 2012 @12:46AM (#4294456)
Only partially.

Mike Ash goes into some detail on his excellent blog: http://www.mikeash.com/pyblog/friday-qa-2012-06-22-objective...

Long story short, some of it is compile time, but some of it involves classes in Foundation (like NSArray and NSDictionary) implementing new methods (like objectAtIndexedSubscript).

iOS needs a base SDK update before those methods will be available there. Or you could monkey-patch them in with a category yourself in the meantime.

Re:Xcode 4.4 is available (for Lion and Mountain Lion) by hboon on Thursday July 26, 2012 @01:08AM (#4294509)
Literals and object/container subscripting are different things, even though they appear at the same time. Container literals should be compile time too and available to all versions of iOS (or at least v4 and above).

I also think it should be possible to support container (NSArray, NSDictionary) subscripting for foundation classes at compile-time for all versions even if the new functions aren't around. They just have to translate to the existing functions. I bet they do this too[1]

(upvoted you, it is a very informative link).

Edit: some more thoughts.

[1] No, they don't do that in v4.4. But maybe they will in a future version of Xcode.

Re:Xcode 4.4 is available (for Lion and Mountain Lion) by woadwarrior01 on Thursday July 26, 2012 @01:15AM (#4294525)
Thanks for the link. I was wondering if they'd implemented type-inference to check what method to call for the indexing operator since the operand could be either an NSArray or a NSDictionary. It turns out they've elided the whole problem altogether by doing this at runtime with new methods. Given how dynamic objective-c is, this seems like the best way to go about it.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by cageface on Thursday July 26, 2012 @12:33AM (#4294414)
It has to be exposed in the SDK too. You can hack in some iOS support via a category but you'll have to use 4.5 if you want the real deal for iOS.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by Reflejo on Thursday July 26, 2012 @04:09AM (#4294969)
I just tried it in the iOS simulator and literals work. @[...] => NSArray, @{...} => NSDictionary, @# => NSNumber
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by octopus on Wednesday July 25, 2012 @09:59PM (#4294023)
I like especially the fact that now I can use initializer lists to fill a vector (just like in Gcc).
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by cbsmith on Thursday July 26, 2012 @03:03AM (#4294782)
At this point, they seem to have better C++11 support than any gcc release. Is it possible that Xcode has now become the most viable C++11 development platform?
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by zmjones on Wednesday July 25, 2012 @09:48PM (#4293991)
their way of dealing with command line tools is rather annoying in this release
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by octopus on Wednesday July 25, 2012 @09:56PM (#4294011)
Yep, I wasn't able to install the Command Line Tools from the Xcode Preferences. It works if you do it manually ... by downloading the Command Line Tools from:

https://developer.apple.com/downloads/index.action

and now I have in my path clang 4.0!

Re:Xcode 4.4 is available (for Lion and Mountain Lion) by beala on Wednesday July 25, 2012 @10:37PM (#4294109)
Both the June and July command line tools give me an error saying they don't support 10.8.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by swdunlop on Wednesday July 25, 2012 @10:56PM (#4294157)
Same here; the late July update is only installable on 10.7. Looks like we're still stuck waiting for Apple to sort out the 403 error for XCode 4.4 on Mountain Lion.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by zmjones on Wednesday July 25, 2012 @11:22PM (#4294238)
I found a link to the 10.8 tools somewhere on SO. It was that or build everything from source...
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by mikeash on Wednesday July 25, 2012 @10:18PM (#4294070)
For whatever it may be worth, installing from the preferences worked fine for me. I heard other reports of failures, though, and assume it's related to the massive number of people all trying to download Mountain Lion at once.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by andrewpi on Wednesday July 25, 2012 @11:24PM (#4294244)
It worked fine for me as well, installing it around 30 minutes ago.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by myhf on Wednesday July 25, 2012 @10:26PM (#4294086)
That page only shows me the downloads for Xcode 4.3 and 4.5 Developer Preview, but it looks like I can use the 4.4 versions just fine by adding "/Applications/Xcode.app/Contents/Developer/usr/bin" to my $PATH
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by dansanderson on Wednesday July 25, 2012 @11:31PM (#4294278)
I couldn't get /Applications/Xcode.app/.../usr/bin/gcc to work for me today. It could not access stdlib includes and such. I got the Xcode preferences installer of the command-line tools to work, and that put a gcc in /usr/bin/ that worked completely. I don't know what's different between the two, but that seems to be the official way to do it.

Kudos to Apple for the self-contained command-line tools package download. Hopefully that'll continue with another update for 10.8.

Re:Xcode 4.4 is available (for Lion and Mountain Lion) by jhawk28 on Wednesday July 25, 2012 @11:15PM (#4294211)
when I tried earlier, it errored out. I just tried again and it is now downloading.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by bronxbomber92 on Wednesday July 25, 2012 @10:48PM (#4294142)
Instead of installing the command line tools package you can access any of the command line tools that's in Xcode.app by prefixing the command with xcrun. May be easier then installing/managing a whole separate installation of command line tools depending on your needs.
Re:Xcode 4.4 is available (for Lion and Mountain Lion) by suyash on Wednesday July 25, 2012 @08:34PM (#4293787)
xCode 4.5 Beta versions are available too