[swift-evolution] [Pitch] Replace 'inout' with '&'

Janosch Hildebrand jnosh at jnosh.com
Fri Dec 18 20:50:37 CST 2015


I'd prefer `@inout` over `&x`.
It more clearly communicates its function and annotations already exist on parameters so it reuses that concept and has a clear location.

When using  `@inout` I'm in favor of this change.

Although I'd like to point out that with syntax highlighting `inout` the keyword is clearly distinguishable from a parameter name.
But I don't mind typing an additional @ which is helpful for those situations without syntax highlighting and with the removal of `var` using an annotation seems more consistent.


- Janosch



More information about the swift-evolution mailing list