1. Use modules.
2. In Xcode, go to your target, go to Build Settings, and at Other Swift Flags, add the following flags: -Xfrontend -warn-long-expression-type-checking=400
This will issue a warning when the Swift compiler takes more than 400ms when deducing the type for a particular expression. If you get no warnings, lower to 300, and if necessary to 200.
Anyone have other tips?
Mobile software development isn't about a developer or two building "apps" anymore, it's grown much bigger than that.
I don't see what the obvious reasons would be. Swift is developed and discussed in the open for one.
There really is no excuse for an IDE developer not to support the latest swift syntax and runtime from day 1, given how there are nightly and weekly swift toolchain releases.
But aren't most iOS apps just thin clients? and if they are thickish isn't most of the code related to UI?
If the above is true, Swift and its currently un-robust tooling should be the solution for most/all projects.
Re: CAD software, I would consider them more productive, but only if they actually knew what the basics were and didn't just depend on the GUI doing all the work. If you can't get underneath the tooling and fix it, then I don't want to work with you, period.
Its just that I don't believe in succumbing to the crutch of tools. If the IDE is getting in the way, get the IDE out of the way - too many projects are incapable of doing this.
Those two are orthogonal concepts. There is e.g. car or medical embedded software that's tiny in scope compared to a big enterprise project.
The entire code base running a modern car goes well within millions of code lines. Our IDE changed in time from Blue River X32 v5 to internally modified Eclipse plugin. The only major use for us are X32 type contractions. [1]
No, you really don't need the IDE to make big software.
Programming, as most technologies, is not about what you basically need. We are not cavemen.
It's about what enhances what you can do.
Look, there's no point arguing about this any further - but I urge you to look at this alternative point of view in your professional career. Without fail, those whose proficiency depends on the features of an IDE are, in my experience, more glib about their work and problem solving, and less likely to actually push to solve common programming problems on their own. Maybe you'll start to notice this too.
Being tied to a single effective tool is not always bad. If the tool is indeed powerful, the need for other tools may not arise. Emacs and Vim users use their editors to work on a lot of different things, for example, and have enormous libraries of plugins and features at their disposal, ready to use no matter the language.
If someone asked me whether to learn an IDE for a specific language or Emacs, I'd say both. The larger your selection of tools, the better - with more tools the number of things you can do faster/better also increases, which leads to higher productivity.
In other words - don't try to code in Notepad forever and be prepared to spend some time on learning new tools.
I basically have to have the documentation open in a separate window at all times, because Command-Click hardly works, and syntax highlighting/completion is never long for this world.
At least Notepad doesn't have pretensions to being a programmer tool.
To be fair - XCode is a problem.
iPhone Apps are not rocket science.
There is no reason for the massive bureaucracy and confusion of XCode - or even Swift.
Not only does Swift try to do too much as a language - dealing with XCode is like dealing with the California DMV.
My god, man the compiler options. Pages and pages of options.
As far as I'm concerned, the biggest failure of the 'Swift' decision, was to be so tied to the old language standard, and to XCode.
The only possible advantage of XCode from a developer perspective is maybe the UI designer, but even then.
Obviously there's a huge investment in Xcode
But ...
Has anyone tried VSCode lately, or Atom? I mean it's possibly to have a 'light' editor and basic compile chain in which we can do powerful things. Or none at all.
I personally loathe using Android Studio or XCode - it feels like working for the government, on a team of 3000 people building a web-site for the local library that never gets into production. Anyhow, I jest.
I think there is rationality in wanting to be able to have a language work without an IDE.
But if I can "write" an 80 character line of code by pressing around 10 keys, I think that's pretty useful. If I can write a method, a class, faster than I would by manually typing and referring to docs all the time, why wouldn't I?
And clearly I'm still getting the work done. I'm complaining about the dissonance of trying to type a method name while the autocomplete dialog wants me to finish the name of a random C macro or an image name. It's frustrating and worth complaining about. Syntax highlighting is useful, the reason it exists is to help you differentiate tokens quickly.
Also nobody is saying that the tool is required to make you productive. The entire point is that it makes you more productive. I consider things like "What file is this datatype defined in?" to be menial work. It's merely a waste of time that requires no skills.
If I had my way while were planning out a "big" app, it would be ObjC.
- ObjC isn't going anywhere, and it continues to receive improvements
- Xcode 9 can still barely handle large Swift apps; I consistently lose syntax highlighting and autocompletion
- Equivalently sized ObjC apps clean build in approximately 1/3 of the time
Swift as a language is fine. There were some neat new concepts it forced me to learn, and I look forward to writing it. But the tools make me want to work on anything else.
edit: Also I was really, really looking forward to Swift 4 & Xcode 9. I hoped there would be improvements in build time and less IDE problems, but I see no noticeable change in build time, and Xcode routinely leaves me unable to quickly make changes to Swift code, either because indexing failed and autocomplete is suggesting random shit or because autocomplete isn't there at all. Then I switch tabs and for a moment I'm looking at syntax highlighting until it just... disappears. Maybe changing a line will fix it, maybe it won't. Xcode 9 might actually be worse in this respect.