5 ms·
> The vast majority of time is spent debugging and maintaining code. Not all programming is the same. I've seen a lot more code churn in frontend projects than
by gurkendoktor 8y ago
> The vast majority of time is spent debugging and maintaining code.
Not all programming is the same. I've seen a lot more code churn in frontend projects than in the backend, where the actual logic and persistence happens. That makes the speed of (re)writing code relatively more important (at least for the iOS apps I've worked on, YMMV).
But even when I had to clean up legacy code, I spent most of my debugging time on on incorrect threading (typically using UIKit or Core Data from the wrong thread), AutoLayout errors, Apple framework bugs, storyboards/NIBs out of sync with code, performance degradations, or anything else where Swift doesn't help much.
In my experience, Objective-C programmers aren't allergic to safety or brevity. We love ARC! It's just that Swift has taken away too much productivity, mostly through terrible tooling and by dividing the community, for very little gain.
> Objective C was always so baroque, when I define a method or variable and declare the exact same thing in a header file
When I helped out on a Java project, I noticed that my coworkers religiously created interfaces for every single class they wrote. They couldn't really explain it beyond it being a "best practice", but I suspect they enjoyed being able to look at a short file that only contained the interface plus JavaDoc, instead of opening the full implementation every time. They basically re-invented header files :P
I don't think people would mind headers as much if Xcode was a better IDE, and we didn't have to copy declarations around manually.
- pjmlp 8y ago> They couldn't really explain it beyond it being a "best practice", but I suspect they enjoyed being able to look at a short file that only contained the interface plus JavaDoc, instead of opening the full implementation every time. They basically re-invented header files :P Then they should have known better. That makes sense for unit testing, in cases where mock classes would be required. All Java IDEs have object browsers no need for header files.
- gurkendoktor 8y agoMockability was the official reason until we started using Mockito 2. I hope everyone on the team was aware of the object browser. And yet they felt better with interfaces everywhere. It might have been a simple case of cargo-culting, though.