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

Alex Blewitt alblue at apple.com
Mon Aug 14 11:28:26 CDT 2017


> On 14 Aug 2017, at 17:12, Matthias Heymann via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Hi,
> 
> I noticed that strictly speaking, the camel casing of methods like “layoutSubviews()” and "layoutIfNeeded()" in the UIView class is wrong:

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

https://developer.apple.com/documentation/uikit/uiview#1653518 <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 <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-- <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170814/2cebbf9c/attachment.html>


More information about the swift-evolution mailing list