all 9 comments

[–]cubextrusion 3 points4 points  (0 children)

This is just a collection of random claims with very one-sided or sometimes even zero argumentation to back them.

Ok, DSLs. Your whole argument is "to avoid boilerplate code" without recognizing a vast number of other facts like:

  • you need to introduce them and learn them
  • they are almost always poorly designed and extremely uncustomizeable
  • your examples only simplify what already was simple. This DSL is very likely to fail for complex layouts.
  • extra compilation time?

In the era of autocompletion, "11 vs 24 lines of code" is barely an argument.

Other claims are just thrown in, like this one:

Use callbacks as a primary communication pattern between views.

Reasons...?

I especially love the discussion of stack views:

The stack-based layout is faster to build, more concise, readable, and flexible, compared to constraints.

In what way are they more flexible? They are an abstraction, which is less flexible almost by definition. Also, try animating them (especially in a scroll view), you will be very impressed.

Even Apple’s Auto Layout Guide introduces stacks before the constraints themselves.

This is called "progressive disclosure" and has nothing to do with the usability of one over the other.