"layoutSubviews()" and "layoutIfNeeded()" camel casing mistake

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

The terminology comes from UIView, which has been part of iOS since at least 2.0:

https://developer.apple.com/documentation/uikit/uiview#1653518

The documentation uses 'layout' as a verb. Indeed, this has been the case for many years and is present on other operating systems, e.g. macOS:

https://developer.apple.com/documentation/appkit/nsview#1661978

The word 'layout' has been used as a verb in other computer systems as well, such as Java's AWT from around the time macOS was born in 1997:

https://docs.oracle.com/javase/8/docs/api/java/awt/Component.html#layout--

So it's around 20 years too late to complain about 'layout' being used as a verb.

In any case, this isn't a swift issue, as these are existing frameworks from Apple platforms, and so it's not appropriate to discuss them further here.

Alex

···

On 14 Aug 2017, at 17:12, Matthias Heymann via swift-evolution <swift-evolution@swift.org> wrote:

Hi,

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

Hi Matthias,

UIKit is not part of Swift - it's maintained by Apple. You may file a bug report at bugreport.apple.com <http://bugreport.apple.com/>, but my guess is that the chances that this will change are very slim.

···

On Aug 14, 2017, at 6:11 PM, Matthias Heymann via swift-evolution <swift-evolution@swift.org> wrote:

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
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution