21 ms·
Xcode 4 public preview - Single window, LLVM 2.0, streamlined editing
- mishmash 16y agoOh man been waiting for this since WWDC. IB integration took way too long. I do have a question for the compiler geeks, though: how was LLVM able to so quickly surpass GCC in both compiling source and binary performance, considering gcc had a two decade head start?
- cloudhead 16y agoI'd say it's both better design from the ground-up (coming from a better understanding of compilers) and financial support.
- fleitz 16y agoIt has 20 years less baggage and 20 years of lessons learned of what not to do. And 20 years of CPU development, remember that when GCC was started there were no superscalar CPUs. GCC isn't a particularly high bar to hit ICC and MSVC have been killing it for years. It's largely the same reason that the ZFS codebase is drastically smaller than the UFS codebase. You don't think of the fastest / shortest way to do X the first time. Not all the code works with LLVM, for example if you use LLVM to compile the linux kernel it won't boot.
- uxp 16y agoLinux and GCC(GNU) have had a special relationship for a long time. It might be a while until LLVM can handle that task. FreeBSD however will actually compile and boot. http://wiki.freebsd.org/BuildingFreeBSDWithClang http://wiki.freebsd.org/BuildingFreeBSDWithClang . It's not completely foolproof yet. I think the BSD community has welcomed LLVM a little more warmly than GNU/Linux.
- ptomato 16y agoPart of this is probably that philosophically the *BSDs don't really want to be reliant on GNU tools.
- rmjb 16y agoThe OpenBSD folks have been searching for a replacement for quite some time now. IIRC, they even got their kernel building with the ancient PCC compiler, which is also BSD licensed.
- asymmetric 16y agointeresting. is that only due to the different licenses used in the two projects?
- uxp 16y agoThats what I was implying in my earlier comment. Though I wouldn't say its the only reason, in my view as an advocate of the BSD License, it's a major reason.
- _delirium 16y agoIt's one of the main ones, but two additional ones, depending on the person, are: 1) some people don't like GNU and/or Stallman having influence on their OS, either for political reasons or due to personality clashes; and 2) some people don't like GCC's design as a technical matter.
- protomyth 16y agoApple wants to use the actual compiler code in XCode and that wouldn't be possible with GPL and their current license. That is also why clang is structured as libraries.
- sjs 16y agoTo be fair Linux has always been designed and written with GCC in mind. I don't think portability (between compilers) has ever been a goal.
- watmough 16y agoThis is really interesting, Fabrice Bellard's tcc is able to build and boot a Linux kernel. http://bellard.org/tcc/ http://bellard.org/tcc/
- fmora 16y agoProbably because the GCC architecture itself no longer allowed for more optimization. Or to put it another way, it had been optimized as much as economically possible. Trying to optimize it further would get us to the realm of diminishing returns. At this point it is easier and more cost effective to simply re-design the whole architecture which will inherently improve the performance. LLVM was designed from scratch with performance being a top priority.
- drewcrawford 16y agoHaving been at WWDC and played with it for a few weeks, I'm not sure I'd call LLVM a hands-down winner. While there's a lot of win in terms of code readibility and the great interfaces it exposes if you're going to write an IDE that understands the code, I'm not convinced it's there yet in terms of binary performance. My apps run around 5%-15% slower, on average, than the GCC -march= setting.
- Niten 16y agoIt may not be a hands-down winner yet, but in the long run it's the way to be headed. I'm more interested in using LLVM on FreeBSD or Linux than on OS X, but I'm happy to see Apple pushing its development.
- megablast 16y agoI can't imagine anyone actualy using IB, at last for anything but the most basic app. It just frustrates me no end, and I am pretty sure most people just create all the elements programmatically.
- megablast 16y agoI guess not.
- mishmash 16y agoNot seeing the problem with IB here. I use it extensively for generic UI elements, with custom views and windows, use it to target the FirstResponder, use it to hook up actions, connect controllers, and to bind objects together - all of things IB (and now Xcode 4) were made to handle. I am curious as to what you don't like abou it?
- sshumaker 16y agoWhere should I begin? - It's incredibly brittle. Good luck if you need to make significant changes to your hierarchy, or change that NSOutlineView of yours to an NSTableView. You'll have to rebuild and re-hook up all of the connections on an object. With no warnings or errors if anything is wrong. In HTML, you can just copy and paste, change some tags, and make some adjustments. Now HTML isn't ideal for application layout - but another markup language could be (MXML isn't bad). - Doesn't play well with source control. Only one user can work on a .nib at once. Just yesterday another programmer and I both made changes to UI. Of course, it was completely unmergeable by machine or by hand - what do you expect when you have GUI generating a 7000-line file for relatively simple UI. So one of us had to re-do several hours of work. This isn't a problem with, say, HTML. - Most significantly, it only solves a small part of the problem. It completely falls down when you're dealing with dynamic / variable UI - you'll have to resort to code anyway. And a lot of the layout you need to do is actually inside cells - say, trying to build a source list like iTunes, or a table view with icons inside of it. IB can't help here at all. Then, you end up laying out the actual UI in code. And what code it is: NSDivideRect(cellFrame, &imageFrame, &textFrame, ICON_INSET_HORIZ + ICON_TEXT_SPACING + imageSize.width, NSMinXEdge); imageFrame.origin.x += ICON_INSET_HORIZ; imageFrame.size = imageSize; textFrame.size.width -= ([self sizeOfBadge].width + ROW_RIGHT_MARGIN); Are you serious? This is 2010. You should not need to be manually calculating the positions of UI elements. There should be a layout language. HTML, MXML, whatever. IB encourages you to use a very low level of abstraction. There's a lot of repetition, and the closed nature of the tool means it's very difficult to build up higher levels of abstraction. But then again, I guess Objective-C loves loves making programmers repeat themselves. There's a reason most professionals don't use dreamweaver to make websites, either. And they are much the same.
- ori_b 16y agoIt actually hasn't. LLVM is consistently slower in most benchmarks. Not by a large amount, but it doesn't beat GCC for speed. The thing is that most compilers these days are limited by the performance of the CPU itself, as they're getting within a few percent of the best you can do.
- amanuel 16y agoGit support was the #1 feature that I was waiting for. Apple thank you for listening.
- weaksauce 16y agoThis exactly. I was looking for a way to hack in git support for a long time. I gave up and just used textmate and make for a while now though.
- hayroob 16y agogit and as petty as it is, not having to type @synthesize.
- cameldrv 16y agoYou want PropertyFromInstanceVariable from here: http://www.bernard-web.com/pierre/code.html http://www.bernard-web.com/pierre/code.html This thing has saved me hours of aggravation. You highlight a line in the struct part of the Obj-C class definition, and it generates the @property, the @synthesize, and a line in dealloc. You can also highlight multiple lines, and it will generate multiple properties. It is even smart enough to know that ints are assign, NSStrings are copy, and other objects are retain.
- Zev 16y agoOr just LLVM 1.5 or LLVM 2.0, as there are C flags you can pass in that will make it so you no longer have to add ivars to your header and make @synthesize the implicit default.
- fleitz 16y agoI can't wait for Single Window, the multi-window design was possibly the worst interface for an IDE I've seen. I was actually very surprised how bad the UX for XCode was compared to the rest of OS X.
- weaksauce 16y agoThe single window way to work in xcode worked very well in my opinion but I agree that the multi way that interface builder had and xcode had by default was the worst.
- thought_alarm 16y agoXCode already has a single-window mode. And as far as navigating multiple documents is concerned, it seems to work exactly the same as it does in XCode 4.
- aliston 16y agoIt looks from the screenshots that they are integrating interface builder into XCode and possibly (I'm hoping) the simulator as well? Even in "single-window" mode, you have to switch through multiple windows/applications in order to do development. The "build window", for instance, is unnecessary as it displays a lot of redundant information. A single window for layout, coding and debugging sounds useful to me.
- jrockway 16y agoIt's called Emacs, and it was released, oh... about 30 years ago.
- GeneralMaximus 16y agoThis. I edit my files in MacVim (cocoa.vim is a lifesaver). The Xcode editor will have to be really freaking good to get me to switch from MacVim.
- deleted 16y ago[deleted]
- vault_ 16y agoI remember reading about how LLVM would be better able to interface with IDEs than gcc because it was library based rather than a giant monolithic system. It's interesting to see how this has been applied.
- deleted 16y ago[deleted]
- Groxx 16y agoSo... when is the public release? btw, the wwdc videos have been public for a while. Take a look at them if you're itching for more infos: http://developer.apple.com/videos/wwdc/2010/ http://developer.apple.com/videos/wwdc/2010/
- Samuel_Michon 16y agoToday, Xcode 4 developer preview 2 has been made available for download. No official release date for the final release is known, but judging from Apple's history with developer previews you can expect it to be out within 6 weeks.
- thought_alarm 16y agoI use XCode in "Condensed Mode": One source/header combo, one Window. And I like it a lot. I've never been a fan of single-window IDEs, going all the way back to Visual C++ 6, and I don't think XCode 4 is going to be the one to change my mind. And god damn it, all the keyboard shortcuts have changed! This is going to be painful. It's clear they've put a lot of work into it. It looks slick, and the organization of the menu and commands is much more thoughtful. The biggest problem with current version of XCode is that it's very difficult for newcomers to learn, and this new version will go a long way to correct that. But none of that matters to me. I can't touch this software until I'm forced to use it, because when that happens I'm going to have to un-learn everything I currently know, start from scratch, learn all new habits, etc. Can't say I'm looking forward to it.
- kenthorvath 16y agoThere's a WWDC session on Xcode 4 - free on iTunes U for registered developers. It might be worth a watch, as they will probably outline the most significant changes, as well as indoctrinate you with the belief that these changes are major improvements over the old way of doing things.
- asnyder 16y agoAlthough I don't use XCode, I'm not sure how I feel about it suggesting minor fixes such as the == example. I enjoy writing a line seeing an issue and then solving it, or at least having to scan it with my eyes. While I'm sure it's not an issue for most, I've always wondered whether that sort of thing breeds dependency. What happens when you don't have the IDE? Do you forget how to scan and fix minor issues? I've seen much worse... I've seen "professional developers" not know how to code or run projects without their all knowing IDE. Although I don't want to point any particular group out, many users of Visual Studio suffer from this issue.
- modeless 16y agoSince the introduction of automatic transmissions many people haven't been learning how to shift a manual transmission. These people aren't necessarily worse drivers.
- statictype 16y agoWell, I think the difference is even less than that. People who never drove a stick-shift may have no idea how to operate one. Whereas someone switching from an IDE to a text editor would still be able to work - just less productive.
- bad_user 16y ago> Whereas someone switching from an IDE to a text editor would still be able to work - just less productive. I have my doubts about that as I have seen many evidence to the contrary.
- bad_user 16y agoThey are in the sense that they need to be picky about the cars they drive. I've been using a manual transmission ever since I took my driver's license 10 years ago. At first I also drove a shitty car ... gears wouldn't shift unless you knew how to touch the gearstick :) Now I can drive just about anything, with no accommodations necessary. Changing gears is also in my reflex and it doesn't bother me ... I just don't think about it. I can also eat a sandwich or talk to the phone with no hands-free while driving, although that's considered a bad practice that's also illegal :)
- modeless 16y agoAww, it installs its own copy of the iOS SDK, so you can't use it with the iOS 4.1 beta yet.
- Zev 16y agoJust make a symlink from the iOS Beta SDK location to the framework dir for Xcode 4 and you can use iOS 4.1's SDK.
- dcheung 16y agoHoly Crap Xcode 4 Single Window! You had me at hello!
- mian2zi3 16y agoAnyone played with lldb yet? Thoughts?
- liedra 16y agoI'm pretty new to Mac OS X programming (coming from a very hobbyist cmdline/web app python background) so using an IDE has been pretty weird for me. I found the disconnect between IB and XCode the most difficult thing about it, it's like there was another layer of programming you couldn't see immediately (the connections) which made it harder to slip back into a project if you hadn't touched it for a while. Not to mention the fact that every time I picked up this project (it's an after hours thing that I don't get a lot of time to play around on) I would almost have to re-read a tutorial to remember how all the connections, etc. worked in IB. I think the main problem really was the disconnect though, so I'm looking forward to actually having everything there. So, when will it be done? :D
- thought_alarm 16y agoIt sounds to me like you don't have a very good understanding of your software's design. That's understandable. Most other IDEs handle GUI development by simply mashing the view and the controller together into a single unit. That is fine if you just have a simple window with some buttons and text fields, but this approach quickly falls apart when applied to larger, more sophisticated software. The Cocoa approach is different in that it completely separates the view (the NIB or XIB) from the controller(s). You're free to design your views, controllers, models as you see fit, and Interface Builder is there to help you realize that design. But you actually have to design your software; XCode is not going to hold your hand and shoehorn you into a specific design, like most other IDEs. A NIB is still a NIB. That's not going to change just because XCode and IB are now a single application. You will still have to design your software, and you will have to understand that design. But software design is hard, so don't be discouraged. It will come with experience.
- liedra 16y agoThis is completely true! I'm very much learning as I go -- back at university when we did user interfaces it was all done in-code: I learned Java and TCL/TK without IDEs, then went on to do web programming and commandline stuff that didn't really need an IDE. So to actually start learning how to use an IDE I not only have to learn about design via IDE but also how the IDE works (also Obj-C, but that's another story) :) And this is why I am still soldiering on with my little app (which is really just a learning opportunity for me rather than anything I plan on capitalising on, so it's okay for me to make mistakes :). I'd like to learn how to do it better, and you're right, that comes with experience. That said, I think the new XCode will help people like me a bit more because it will probably be easier to see the links between the UI and the code. :)
- c00p3r 16y agoThank them for clang and clang++. Hope to see it as default FreeBSD 9 compiler. ^_^ Also it is time to realize that LLVM-based tools are much more effective than JVM-based. (at least they can run or ARM) ^_^
- aaronblohowiak 16y agoWhat makes you think jvm doesn't run on arm?
- c00p3r 16y agoWhere I can download JRE for Linux/ARM? ^_^ Do not tell me that Dalvik VM is the same as VM from JRE. How could I run, as declared by marketers - "Code once run everywhere!" a typical Spring + Hibernate + 100 another dependencies poorly designed crap on Dalvik VM? Thanks.
- Hopka 16y agoIs it just me or does the UI Layout look very much like iTunes?
- pietrofmaggi 16y agoXcode 4 preview 2 is now available to Mac and iPhone Developer Program members (only the ones with paid subscription). PLEASE NOTE: Xcode 4 is beta software --> Continue to use Xcode 3.2.x for production development. And make sure to review the Xcode 4 WWDC sessions before you dive in!
- loewenskind 16y agoWow. I'm impressed. The code fixing stuff is something I have to buy Resharper to get on C#.
- jedbrown 16y agoLLVM 2.0? That was released over 3 years ago. Maybe they mean LLVM 2.7?
- bonaldi 16y agoNotably missing feature: one that allows them to issue a point release to the SDK without making you redownload 3gb of dev environment each time.
- wildmXranat 16y agoI don't understand why they need to do this. Does anyone have a good explanation ?
- mustpax 16y agoDeploying a major release as a diff to a complex development environment is far from effortless. They probably figured the effort vs. payoff ratio didn't work out, compared to making improvements to the product itself.
- someone_here 16y agoIt's strange to me how products like source control manage this. Why is this different?
- Groxx 16y agoThey manage it for typically-small changes. Try computing a patch for the differences between major revisions of a Linux project, and watch how long it takes. Then try to apply it.
- malkia 16y agoWith Visual Studio for example, it's not only about merging files, but installing various DLLs (for the runtime - vcredist*.exe), COM objects, .NET stuff, etc. Also creating (if possible) proper uninstalls. VS2008 runs some SQLserver, PDBserver, and who knows what else (run ProcExp and see)
- Tamerlin 16y agoSource control applications don't generally worry about dependencies, and they also generally aren't concerned with multiple projects. Using .NET as an example, the SDK patches would include: Drivers DirectX XNA WPF BackOffice SQL Server (or Express or Lite or whatever they call it) System libraries ASP.NET C# F# ILR C++ .NET VB.NET And the list goes on. Apple's developer kit has a similarly vast suite of libraries and services, I just don't know all of their names. Each one in isolation wouldn't be all that big a deal, but combine them and you have the option of massive downloads or a nightmarish dependency management problem.
- wallflower 16y agoThe changes to the standard keyboard shortcuts could drive you nuts.
- butu 16y agoLooks like very good improvement on the performance and to assist developer while development like fixing error stuff.. Till date I am not able to make any IDE whether xcode, eclipse or netbeans as my default editor bcoz IDE are damn slow... if I want to write program it should be open instantly... may be with new MacbookPro and xcode I can feel that way... then I can consider :) but definitely looks good...
- grk 16y agoGah, I was hoping they'd add some support for (mac)ruby. It would be awesome to have real tab-completion working.
- texel 16y agoDo the existing MacRuby features still work (ie autodiscovery of IB outlets/actions)?
- Lewisham 16y agoWhat does it support for Ruby dev? I mean, I like TextMate well enough, but it doesn't even show suggested completions without hitting Esc, which doesn't jive for me at all. Can you bind shell scripts to the run button? Code folding?
- lemming 16y agoIt's incredible to me that they can bring out major version 4 of Xcode and still not fix the most fundamental thing in a modern IDE - navigation. Until I can control-click on a symbol and jump to it, search for related objects (find my interface, find implementations of an interface, what overrides this etc etc) in my opinion it's just broken.
- DeusExMachina 16y agoWhat do you mean? If I command-click a symbol in XCode, it jumps directly to the definition, and with alt-click it displays the documentation. I've been doing it for a long time, it's not new. What feature do you miss?
- lemming 16y agoThat's possible, I apologise if so - it's been a while since I tried to use XCode but a colleague told me they hadn't really improved the navigation recently. If command-click works that's a big step forwards. I'd also expect navigation based on the semantics: 1. Find classes that implement an interface. 2. From a method in an interface find implementations of that method. 3. From a class easy navigation to the interfaces it implements. 4. Find usages of a particular method, either from the concrete instance or the interface equivalent that it implements. I'm not very familiar with Objective-C but I'm sure that there's tons of related navigation that could make use of Posing and Categories, for example.
- DeusExMachina 16y agoFor 1. and 4. I use the "Find in Project -> as symbol" option. Not the best way of doing it, but decent. 2. is not available AFAIK. 3. is present, but only for inheritance and for header files inclusion, not for interfaces (called protocols in objective-c).
- pornel 16y agoI liked that entire project — including targets and build steps — was in the tree view on the left. Now tree view has been limited to be a file browser. Targets and build steps are now hidden deeper in settings windows and tabs. To me old way was simpler and felt more elegant. I'm not fond of "mystery meat navigation" — tabs have icons instead of text labels. I'm sure I'll learn that quickly, but it makes learning curve higher and on first impression UI looks more overwhelming.
- bbb 16y agoThe '=' vs. '==' example actually nicely demonstrates the limits of automatic bug hunting. The variable 'rig' is NULL when it is being dereferenced, thus the program will segfault regardless of '=' or '==' being used. The "fix-it" tip is highly misleading. http://developer.apple.com/technologies/tools/whats-new.html#fix-it http://developer.apple.com/technologies/tools/whats-new.html... (This is probably a side effect of PR people preparing the website; there is no reason why LLVM should not be able to detect this particular kind of NULL-dereference.)