[swift-evolution] [Guidelines, First Argument Labels]: Prepositions inside the parens

Douglas Gregor dgregor at apple.com
Thu Feb 11 22:33:13 CST 2016


> On Feb 11, 2016, at 5:50 PM, Matthew Judge <matthew.judge at gmail.com> wrote:
> 
> 
> 
> On Feb 11, 2016, at 18:19, Douglas Gregor via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Here’s a fun set of examples from NSGradient:
>> 
>>  -  func drawFrom(startingPoint: Point, to endingPoint: Point, options: NSGradientDrawingOptions)
>>  -  func drawIn(rect: Rect, angle: CGFloat)
>>  -  func drawIn(path: NSBezierPath, angle: CGFloat)
>>  +  func draw(from startingPoint: Point, to endingPoint: Point, options: NSGradientDrawingOptions)
>>  +  func draw(in rect: Rect, angle: CGFloat)
>>  +  func draw(in path: NSBezierPath, angle: CGFloat)
>>     func drawFromCenter(startCenter: Point, radius startRadius: CGFloat, toCenter endCenter: Point, radius endRadius: CGFloat, options: NSGradientDrawingOptions)
> 
> Why isn't this:
> func draw(fromCenter startCenter: Point, radius startRadius: CGFloat, toCenter endCenter: Point, radius endRadius: CGFloat, options: NSGradientDrawingOptions)


Huh, I’m not sure why it’s showing up as drawFromCenter in that paste. If I go to the source at:

	https://github.com/apple/swift-3-api-guidelines-review/blob/swift-3/Platforms/OSX/AppKit/NSGradient.swift

there’s a big “draw” family that pops out:

  func draw(from startingPoint: Point, to endingPoint: Point, options: NSGradientDrawingOptions)
  func draw(in rect: Rect, angle: CGFloat)
  func draw(in path: NSBezierPath, angle: CGFloat)
  func draw(fromCenter startCenter: Point, radius startRadius: CGFloat, toCenter endCenter: Point, radius endRadius: CGFloat, options: NSGradientDrawingOptions)
  func draw(in rect: Rect, relativeCenterPosition: Point)
  func draw(in path: NSBezierPath, relativeCenterPosition: Point)

	- Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160211/d5244b3d/attachment.html>


More information about the swift-evolution mailing list