Hacker News new | past | comments | ask | show | jobs | submit login

Xcode isn’t too bad.

I wish the author told me more about it than just this. Can somebody comment on how it compares to recent VS editions these days? About 5 years ago I also looked into using OSX as main OS. As I've always been using non-commandline graphic text editors and IDEs for most coding that made XCode the go-to environment but I just couldn't deal with it even though I tried. I don't remember all details but in general it just felt inferior to VS on like all fronts, with no advantages of any kind (for C++). Again, IIRC, but it did annoying things like opening the same document in multiple windows, one for editing and one for debugging or so? Anyway, what's the state today?




I'm using both every day at the moment.

- I don't spend a lot of time setting up the IDE, so it's important the defaults are sensible. For instance, it might be possible to change this, but XCode's code completion seems to be less useful than VC2015. I really need it to be near immediate, and I also need it to check string that may appear in the middle of a function name instead of just the start. Especially since NS libraries have strange and long names for things. As I'm writing this, I just found out you can have tabs in XCode. Why isn't that a default?

- XCode crashes maybe once or twice a week for me. VC doesn't.

- Unspecific weird things happen in XCode way more than VC. For instance I was unable to see variable values in XCode for a while. Eats up my time looking it up. Hasn't happened to me on VC yet.

- XCode is highly integrated with the Apple environment. You can build stuff for the app store and send it right there.

- XCode has a less than complete Git integration. You need a bit more detail than what it gives you. I use SourceTree anyway, but it might matter for some people.

- Compile times are hard to compare, as I'm doing different things on the two environments. VC2015 is definitely a lot faster than a few years ago though.


> XCode crashes maybe once or twice a week for me. VC doesn't.

Only once per week? Lucky you. Sometimes XCode has crashed for me several times per hour. Sometimes it works for a while. Sigh Apple [1]. The fact XCode uses clang as a compiler absolutely rocks.

That said, Visual Studio 2012 just crashed earlier. I guess it was some bug in Window splitting or something, did some unusual things with that just before the crash. VS2012/2015 seems to be generally stable. Visual Studio C++ IDE context operations, like finding references just doesn't work well at all. It finds so many totally irrelevant items.

Excited to try VS2015 with Clang support for Windows applications, with official support.

[1]: When it comes to personal experience, Apple's recent software quality seems to be shoddy. For example USB3 mass storage is stable only for a few minutes before a forced USB stack reset on my El Capitan Macbook Pro retina 13" 2015. Sigh. Impossible to do things like run virtual machines off USB storage on a relatively new $2k machine... At least without booting to Linux or Windows. Things like these make me seriously consider to stop using OSX as my primary machine.


Try using the left usb port.

I have the same MBP and while the it'll drop anything on the right one that's more intensive than a flash drive, the left one has no such issues. Lot of reports of the same "solution" working floating around.


Left USB3-port seems to work if I also remove SD card from the reader. Interesting.


Here's some conversation about it if you're interested https://discussions.apple.com/message/18997143#18997143


That discussion seems to be from 2012. And the USB issue is still not solved in 2015 Macbook Pro Retina? Sigh...


XCode reference finding doesn't work fantastically for me. When I look for a symbol it puts in some strange characters that might be wildcards, but doesn't change the search mode. Means I end up doing string search most of the time.

VS is okay, not perfect. But I'd say it's better than searching for strings when you really want a type or function.


I'm having a terrible time in VS2015 so far. When debugging I get very frequent hangs of the whole environment. I haven't managed to find a solution to the problem yet.


Xcode compilations has been much faster for me. A Qt program i develop at work compiles in 2 minutes with Xcode and over 6 with VS 2013. Clang and GCC compile much faster for me than VS 2013.


Tabs in Xcode have been around for a while.


I use both VS and Xcode daily. Once you get over the initial "gee this thing looks like iTunes" shock and get used to a few small annoyances, Xcode is quite ok to work with. Keyboard shortcuts and source file navigation are completely different to anything else though, once you get used to it, it works well though.

Where Xcode is better than Visual Studio for C/C++ dev (IMHO of course):

- C++ compiling and linking is easily 5x..10x faster out of the box than Visual Studio thanks to clang

- the static analyzer has a really nice 'arrow'-visualization of the steps that lead to the warning

- clang provides more useful error messages

- compiler warnings and errors are directly overlaid into the text editor view

- built-in support for clang address sanitizer (just a checkbox to tick)

- support for iOS development is really slick

- better out-of-the-box support for command line builds either through xcodebuild or the gcc-compatible toolchain

- Xcode comes with a lot of profiling and analysis tools where Visual Studio has only slowly caught up (but VS2015 seems to be mostly on par).

Where Xcode falls behind compared to VS:

- Xcode has that strange 'Scheme' feature for build configuration

- the debugger's variable inspection has usability issues

- working on source files with a couple thousand lines of code feels laggy

- before El Capitan, the whole UI felt slow on a Retina MBP, but I guess that's because of general optimizations in the OS

- it crashes or freezes about once or twice a week on me

- probably a number of smaller ignorances which I have learned to ignore

I usually don't touch any of the UI builder tools in both IDEs, only straight C and C++ stuff so I can't comment on the more platform-specific features.

[edit: formatting]


I find it interesting that most of your points in favor of Xcode are just because of the clang backend, while the points for Visual Studio are more about the IDE itself.

Would be interesting to hear your opinion again, once clang is fully supported through Visual Studio.


Yes, I noticed this too while writing the points down. It really comes down to the clang back-end. I'm really looking forward to the clang integration in VS, and also really love the work MS is doing to fix Android native development.

One strange thing I see with clang running on Windows (in the form of the emscripten fastcomp backend) is, that clang runs a lot slower on Windows than OSX or Unix. So may be it is some underlying IO problem? I'm not sure but hope this can be fixed.


This matches my own experience quite closely. Good list.

There is a lot of head scratching with XCode project configuration (for me at least). It's very unintuitive.

clang (though XCode) is much, much faster compiling my projects than cl.exe (through VS) even though I'm using precompiled headers in the Windows build and no PCH on the clang build. VS2015 is supposedly much faster but I still have a few compilation issues I need to work through before I can switch to it.

The debugging experience on Visual Studio is much more pleasant.


My personal experience:

Visual Studio feels a lot more "enterprise-y" than Xcode and offers a lot more advanced features and tools on pretty much all fronts, especially in the UI (e.g.: Xcode doesn't even have file tabs, but sth. I'd describe as big "whole-UI-tabs"). But...

Xcode has llvm. This compiler and it's tools (i.e. the analyzer, debugger, etc.) just make VS' compiler look like it's from the 90s. Really.

-> Have you ever heard of llvm's "address sanitizer"? Forget the days of endless debugging! This little helper has revolutionized my debugging productivity and solved so many little subtile bugs for me...

So in the end you'll loose a lot of nice UI gimmicks and additional tools, but the compiler suite makes up for that.

And even if you don't need those llvm features, you still get a unix environment, which makes working on many fronts a lot easier. E.g. I'm primarely working on different kinds of web servers: To test everything I can just install whatever I need... brew, curl, netcat, wrk, ... And it will just work. And let's not forget all those "standard" unix tools like find, xargs, grep, etc.!


What does the modern Xcode tooling offers in regards to the 90's parallel debugger, parallel watchs, thread control, directx debugging, visualizers, code navigation, extendable security analyzers?


> Xcode doesn't even have file tabs, but sth. I'd describe as big "whole-UI-tabs"

I think this is an intentional interaction design. When you are always working with hundreds or thousands of source files, tabs kind of lose their meaning. The fuzzy-search quick open panel and project-wide find become your main dependency for quickly jumping around your codebase (with the benefit that you don't need to touch the mouse).


FWIW, in VS you can switch between tabs with Ctrl-Tab (and toolbars by pressing Ctrl-Tab, holding Ctrl and navigating with the cursor keys).


Ctrl+Tab works pretty much in every app with tabs. Very useful shortcut.


> Xcode doesn't even have file tabs, but sth. I'd describe as big "whole-UI-tabs"

Preferences → Navigation → Double Click Navigation → Uses Separate Tab


Oh... Thanks! :)


> just make VS' compiler look like it's from the 90s. Really.

Because that's what they are.


LLVM may not remain a feature that only exists in one column soon. It's a brave new .NET world... LLILC is a thing (.NET frontend for LLVM). LLVM has a role in Android and iOS work in VS already and I think that role will only expand further.

There's a lot of attention on .NET Native. Given that LLILC went from nothing to being able to build and JIT Roslyn in 6 months...

Let's just say I have some speculation in mind.


Please do go on, if you will.

I'm primarily a Python guy and with the 2/3 split, I've had my eye on .Net Core to migrate my business platform to. Pretty much been looking to dump Python for anything over a line count of 500 and keep it that way. I'm open to any speculation as to where it's going because I'm finding the .Net platform to be more attractive than ever. A few years ago it was looking pretty sad but MS really turned it around and I'm interested in a permanent migration. I really can't find much, that I enjoy using, that approaches Python's broad use cases than C# on .Net. With dotNet Native and Xamarin, I'm very seriously considering the plunge.


I use both on a regular basis, VS for my job and XCode for hobby work.

I prefer VS because it performs better when editing and navigating the code base ( it is actually faster to run in it inside VirtualBox than XCode natively ).

Also VS has code navigation and editing features that XCode lacks. For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box. You can then populate the replace box with what you have in the clipboard or just type in what you want. In XCode you need to copy the word to replace into the clipboard, do a Cmd+F, paste the word into the search box and then type in the replace box. This is much slower.

In VS you can setup bookmarks in your code with Ctrl+F2 and jump between bookmarks by pressing F2. This is great when you need to have present multiple parts of the code base to accomplish some task. I don't know how to do this in XCode.

In VS you have a stack of source code windows that you can easily move about via Ctrl+W+n where n is the stack depth. This is incredibly useful to navigate between multiple files. Again, I don't know how to this without using the mouse in XCode.

Then there are other issues with XCode mentioned by other comments like the incredibly confusing build settings and the instability of the IDE.

I often wonder if Apple actually uses it to develop their software.


I haven't used VS in many years, but I like what you describe. I don't know if this will be helpful, but these are my alternatives in Xcode:

> For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box.

Your workflow sounds nicer than Xcode's here. While I don't often use find+replace, I do use project level find constantly. My muscle memory shortcut for this is:

Cmd+C, Cmd+Shift+F, Cmd+V, Return

I'm pretty sure I use this hundreds of times a day. Especially when analysing unfamiliar code to trace its execution paths.

> Ctrl+F2 code bookmarks

These sound really cool. A bit like numbered unit groups in Starcraft.

The only similar mechanism in Xcode is quick open. Cmd+Shift+O then start fuzzy-typing the name of a file, method or declaration and hit return to jump to it in the editor (option+return for assistant editor). I have actually changed my quick open shortcut to Cmd+Shift+D because it's easier to trigger one-handed.

> In VS you have a stack of source code windows that you can easily move about via Ctrl+W+n

Unfortunately, while a stack of source locations is maintained in Xcode, you can't jump to a direct location within the stack.

What I do here is use Ctrl+Cmd+Left and Ctrl+Cmd+Right to navigate back and forward in the history stack for an editor window. So, for example, if you Cmd+Click a symbol to jump to its declaration, you can press Ctrl+Cmd+Left to go back.

The one thing I like about Xcode's version of this is that it keeps track of source locations rather than files or windows. So you actually navigate back/forward within the same file (if you were jumping around within the file) as well as between files.


You can use Cmd+E to directly insert the selected text into the search buffer, so for the Project-Wide search you wind up with the shorter sequence:

Cmd+E, Cmd+Shift+F, Return

This sequence seems to work in many other apps, I don't know if it's a system command or just a common convention.


Thanks! That's really useful to know.


To find a word, just highlight it, hit Command-E to select it into search, and then use a search command such as Command-Shift-F or Command-G.


In regards to the find and replace, you can actually rename a variable or function by placing your cursor in it and hitting Cmd+Ctrl+E (that may not be the right shortcut, but I know there is one). No danger of changing something you didn't want to change.

As far as the file stack goes, I'm not really sure what that does; but Xcode has other navigation options, like tabs, and files can be switched with the fuzzy finder.

You are absolutely right about the instability—that's the reason I switched away from Mac/iOS development. Too many weird bugs, in Xcode and in Swift. I haven't found it too slow on an SSD but when I used an HDD the speed was horrible.

> ( it is actually faster to run in it inside VirtualBox than XCode natively ).

Is there anything special you're doing with VBox? In a Windows VM, Eclipse is mostly usable, but disk accesses (or something) have incredible latency. It makes opening a new tab take a few seconds.


>In regards to the find and replace, you can actually rename a variable or function by placing your cursor in it and hitting Cmd+Ctrl+E (that may not be the right shortcut, but I know there is one).

This only performs a rename in the current file though, not across all files in the current project. (At least in Xcode 5, maybe this has been changed in more recent releases.)

Still it is really useful.


>For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box

I'm fairly sure Xcode has a command "enter search/replace string" that puts the current selection into the search/replace box.


I would love to know how to do this.


Across all (Cocoa?) Mac apps, cmd-e should do it. It definitely works in Xcode.


Here's an overview of all Visual Studio shortcuts (there are tons):

http://visualstudioshortcuts.com/2015/


For the find/replace in VS, you don't need to first double click on a word. You just need to stand anywhere on it and press Ctrl+H


I've been using XCode daily since version 3 and I still miss VS. XCode (IMO) is a festival of UX badness - can't change positions of navigator windows, can't change fonts/colors outside of source/console, the 'assistant' window (or whatever it's called this week) frequently opens up unexpected or unrelated files, refuses to stop trying to automatically balance square brackets, spews truncated errors and warnings over the top of code then shows a tiny version in a mouseover for about 3 seconds before hiding it, truncates said warnings in the issue navigator, tiny fonts almost everywhere, severe weirdness with variable inspection and no integrated 'watch' in the debugger - which likes to show disassembley even when you ask it not to.

Lack of refactoring support for Swift is currently baking my noodle, as is the lack of a supported plugin API (with which I could solve many of my own problems). Very crashy.

All that being said, it has a lot of good stuff. The analysis and profiling tools are great, there's a bunch of really powerful tools for games and 3D, view debugging is a thing now, the UI builder is super powerful (once you get used to it) and the unit/performance/UI testing tools are (IMO) pretty awesome. Lately integration with all things App Store (provisioning, entitlements, etc) has got a lot better and most of my pain points there have gone away.

It's hugely subjective though, some people would disagree with much of this. Like any IDE, you end up in a love/hate relationship. The main difference being that if you hate VS you can hit up the extensibility API and make your pain go away, whereas Apple don't really care if you hate them.*

*I'm aware of Alcatraz and it's neat, I'm just not quite sure I want to introduce unsupported hackery into my production environment.


Does turning off the "Automatically balance brackets in Objective-C" preference not work? I like the feature, so I've never tried turning it off, but it sounds like it'd solve your problem.

You can also change the assistant editor to manual control: I frequently alternate between automatic, UI, and manual control of the right pane. There are some great keyboard controls to make it easier.

I don't use (need?) 'watch' in my debugging, but I thought the UI exposed a command for doing so (is that what you mean by integrated?). I think right clicking a value/variable has 'watch'. And I'm sure that LLDB has commands for it.


> Lack of refactoring support for Swift is currently baking my noodle,

Yeah, I hear the refactoring tools are great, but they don't work with C++ either, which is what most of my source-base is.

>as is the lack of a supported plugin API (with which I could solve many of my own problems).

I don't know if this would solve your problem, but you can tell Xcode to compile (or maybe handle is a better word) any type of file with a script. So if you want to compile your Haskell source with Xcode, for example, just go to the target settings, click on the "Build Rules" tab, and add a rule that says "Process files with names matching: " *.hs, and Using "Custom Script:" with a pointer to a script that runs the input file through ghc, or whatever you need.


Adding in a third option to the mix - JetBrains recently added a C++ editor to their catalogue called CLion[1]. While VS and XCode have quite a headstart over it, CLion is cross platform and comes with native support for CMake projects. JetBrains also make the (de-facto from my experience) Java IDE - IntelliJ which shares a core engine with CLion.

A bugbear of mine for XCode is the absence of C++ refactoring tools, which CLion certainly has.

[1]: https://www.jetbrains.com/clion/


If you do mainly Objective-C, JetBrains AppCode is pretty good. Refactoring tools are awesome, even though they are still working in Swift support. Code navigation et.al. are on par with other JetBrains products. Debugging works pretty fine.

You still have to revert to XCode for that crap that is Interface Builder. JetBrains tried to write an IB clone inside AppCode, but they abandoned it.

AppCode lets me code 80% of the time without having to use that horror that XCode is. Alcatraz helps a bit alleviating the other 20%, specially the XVim plugin for Xcode.


> You still have to revert to XCode for that crap that is Interface Builder

As an alternative opinion, I use Interface Builder every day to visually create my interfaces, add layout constraints to it, hook up actions to buttons and define the navigation flow of the app. I very much like the fact that I have small view controllers.


I don't use VS but I use Xcode every day. Downsides: incredibly laggy, buggy, can crash a lot depending on the version. Upsides: actually pretty thoughtful in terms of UI and UX, at least insofar as a fully-fledged IDE can be. I could never wrap my head around VS's stupid toolbars. Debugging, when it works, is really nice; there's more interactivity and inline code interaction than I remember VS having. (VS probably has more power features in this arena, though.) The profiling tools are top-notch; you can even capture frames when debugging an iOS OpenGL app. Fuzzy search is a huge help — is VS still missing this feature? You can very easily access the docs for any property or method with an Alt-click, as well as the headers with a Cmd-click. Adding external code and projects, as well as hooking up all the dependencies, is pretty easy once you've done it a few times. So yeah, not great by any stretch, but pretty good when it works.


Laggy and buggy? That sounds like Visual Studio to me and I use that 8 hours a day. However, it's a damn good environment for C# and F# development, and Intellisense is pretty awesome in 2015.

In VS, Control-; is a pretty good way to navigate. I turn off all the toolbars anyway.


>In VS, Control-; is a pretty good way to navigate.

Not for me. ReSharper's "Go to Everything" is so much better.


If you're having issues, I would suggest it's something to do with your particular setup. VS is a RAM hog, but if you have enough RAM, it is very stable. Certainly doesn't lock-up or bomb-out-to-desktop as often as Xcode, NetBeans, or Eclipse on me.


I run VS with all of the toolbars removed and drive it almost completely from keyboard shortcuts. Occasionally, I use the menu bar, but it's usually only for first-time-project-settings-tweaks.


I can only speak for Xcode 5, but after I read an article similar to http://mattorb.com/xcode-behaviors-for-fun-and-profit/ that explained how to effectively use tabs and "behaviors", I am mostly a happy camper. I also replaced its clang/libclang.dylib with a more recent build, so I could have C++14 support.


Why are you two major versions behind?


I'm way more productive in Xcode. I've also used it more in the last years so that obviously influences my statement.

I find the UI in VS2013 very "unstable" - I constantly manage to drag stuff away and hide windows I need to use. I miss the .h/.cpp side by side view when I'm in VS.

It's very easy to setup a color scheme in Xcode that looks nice. I've used hours in VS to get something that is ok. And then it resets to the default about once a week randomly.

Debugging C++ template code actually works in Xcode. Running debug build of stl under win32 is extremely slow in my experience.

I almost never have crashes in Xcode, but I think this probably depends on your code base and project setup a lot.

LLVM compiler errors are much easier to understand. That said, VS have found bugs that LLVM don't see. So, compiling on both help keep code base in good state.

Our game code compiles in half the time on Xcode/LLVM compared to VS2013.


> Running debug build of stl under win32 is extremely slow in my experience.

Set "_NO_DEBUG_HEAP=1" in your system environment variables.


I use Xcode and visual studio daily.

Things I like about Xcode:

- the OpenGL debugger and profiler are top notch

- clang is a great compiler

Things I dislike:

- it's incredibly unstable. I've had it crash 8 times within an hour.

- I can't do a find-in-files without freezing the ide for 30 minutes. (Visual studio can handle the same code base in seconds)

- a lot of ui design decisions are "different" for seemingly no reason. Most devs can jump between vs/IntelliJ/eclipse easily, but almost every Xcode design decision is just weird. Like why do compile errors show up where my file navigator is supposed to be? Why are important tabs just shown with tiny incomprehensible flat icons? It's all arbitrary, but it seems like every ide has settled on conventions that Xcode breaks to no obvious advantage


Dunno much about VC but the Xcode editor compared to Jetbrains IDEs (IntelliJ) is horrible, ABSOLUTELY HORRIBLE. I'm just talking about the code editor (storyboard editor and other tools are fine).

I'm missing Jetbrains code completion so hard and all those useful shortcuts like CMD+E, CMD+W, CMD+ALT+V, CMD+ALT+M, SHIFT+F6, CMD+SHIFT+UP/DOWN, CTRL+N, CMD+1..9, CMD+F9, ALT+SHIFT+F9/F10.

Guess I have to buy an AppCode license.


For me it's just feels too heavy and laggy, though I cannot compare to VS.

But I do not do much iOS/OS X GUI development, so I am happy with the terminal/vim.


I can attest that Visual Studio and Xcode can both feel laggy, especially with respect to C++ development and static analysis (Intellisense or whatever they call it). However, this may not be so much Microsoft's or Apple's fault as much as that IDE tools carry high overhead as they have to manage a lot of symbols from every header file referenced, including parameter lookups, etc.

On top of that, I think Xcode (like Eclipse) compiles your code as you type, leaving you no surprises until you need to link...


Xcode checks your code as you type (90% of the time, sometimes early errors, e.g. in a header, make it give up completely on a file). Compiling still is a separate step. Current versions of VS do the same, though, even for C++.


Visual studio compiles as you type. It has to, to work with e.g. 'auto'. Vs has two compilers actually, one that compiles as you type (and tries to guess what you mean more), and one for the real compile cycle.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: