<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Hi all,</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">I reviewed the changes and I feel positive about them in general. For whatever it’s worth, I like them. </pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">There were some changes in Core Data for example where the with preposition is used in other parameters in addition to the first one. I thought only the first parameter label was to use the with preposition. For example, I think I would remove the forObjectWith and the withContext labels and keep objectID and context as the labels:</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255); font-size: 15px;" class=""><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13px; background-color: rgb(234, 255, 234);" class="">+ func </span><span class="x x-first x-last" style="box-sizing: border-box; border-top-left-radius: 0.2em; border-bottom-left-radius: 0.2em; border-top-right-radius: 0.2em; border-bottom-right-radius: 0.2em; background-color: rgb(166, 243, 166); color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13px;">newValue(forRelationship</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13px; background-color: rgb(234, 255, 234);" class=""><font color="#333333" class=""> relationship: NSRelationshipDescription, </font><strike class=""><font color="#ff4013" class="">forObjectWith</font></strike><font color="#333333" class=""> objectID: NSManagedObjectID, </font><strike class=""><font color="#d95000" class="">withContext</font></strike><font color="#333333" class=""> context: NSManagedObjectContext?) throws -> AnyObject</font></span></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Thanks</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Ricardo Parada</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""></pre><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Hi everybody,
Having looked at some examples, the API guidelines working group members
that were present this morning agreed we really want prepositions inside
the parentheses of method calls.
Here are some results for the importer; we're still tuning some of the
heuristics but overall we feel very good about the preposition
placement:
<a href="https://github.com/apple/swift-3-api-guidelines-review/commit/da7e512cf75688e6da148dd2a8b27ae9efcb8821?diff=split" class="">https://github.com/apple/swift-3-api-guidelines-review/commit/da7e512cf75688e6da148dd2a8b27ae9efcb8821?diff=split</a>
Note that this is not final wording, but here are the guidelines we're
working with for first argument labels:
A. Try to form a grammatical phrase including the first argument and
describing the primary semantics at the call site.
B. The first argument gets a label when and only when:
1. It does not form part of a grammatical phrase describing the
primary semantics. For example,
```
x.dismiss(animated: y)
```
[more examples needed]
Note that parameters with defaults never describe the primary
semantics. so are always labeled.
```
func invert(options options: SomeOptionSet = []) // yes
func invert(_ options: SomeOptionSet = []) // no
```
2. The method is a factory method; such calls should mirror
initializers, with no preposition. For example,
```
let x = UIColor(red: r, green: g, blue: b)
let y = monitor.makeColor(red: r, green: g, blue: b)
```
3. It is part of a prepositional phrase
a. The label normally starts with the preposition.
For example,
```
x.move(from: a, to: b)
x.loadValues(forKeys: ["fox", "box", "lox"])
```
b. ...unless the preposition would break a very tight association
between parameters:
```
x.moveTo(x: a, y: b)
```
[encourage grouping parameters into higher-level concepts,
e.g. Point, in these cases]
Feedback most welcome, of course.
--
-Dave
</pre></blockquote><div class=""><br class=""></div></body></html>