Hacker News new | ask | show | jobs
by vyshane 4293 days ago
For me, it comes down to the fact that I find Auto Layout more declarative. I'm `saying what I mean` when I apply constraints - that can be done in code too, of course, although Xcode 6 is getting pretty good at surfacing that information. Whereas when I'm dealing with a box model I'm having to play compiler in my head. LinearLayout, RelativeLayout - these are terms that are optimised for the computer to understand. Constraints are the way we humans think about things. "Element A should always be 10 points to the left of Element B".

It's a bit like imperative vs. functional programming. In the former model, I have an idea in my head and I need to nest containers step by step to get to the final form. In the latter I'm simply building up a ruleset.

But like I said, that was my personal preference. I guess we'll have to differ on opinions ;)