[swift-evolution] "layoutSubviews()" and "layoutIfNeeded()" camel casing mistake

Matthias Heymann matthias.heymann at gmail.com
Sat Aug 12 12:59:40 CDT 2017


Hi,

I noticed that strictly speaking, the camel casing of methods like “layoutSubviews()” and "layoutIfNeeded()" in the UIView class is wrong:

Clearly, the word “layout” is used as a verb here and should therefore be spelled as TWO words, as in “please lay out all subviews”. Only the noun form is spelled as one word, as in “the layout needs to be updated”.

Therefore, it should rather be “layOutSubviews()” and “layOutIfNeeded()”.

A lot of people are getting this wrong, so please don’t judge from what you see other people do, but rather what the dictionary says:

https://www.merriam-webster.com/dictionary/lay%20out
https://www.merriam-webster.com/dictionary/layout

Matthias


More information about the swift-evolution mailing list