lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

33203955: [os overlay] Please provide os_log variant that takes `[CVarArg]` #17871

Open openradar-mirror opened 7 years ago

openradar-mirror commented 7 years ago

Description

Summary: The Core Team has lamented before that no public API should be provided that only takes Swift varargs (i.e., the Foo… pattern) because it prevents API composition.

The os_log overlay for Swift does only this.

See also: https://github.com/apple/swift/blob/master/stdlib/public/SDK/os/os_log.swift#L23

Steps to Reproduce: Attempt to use os_log in API composition.

Expected Results: I can chain transformed argument lists into the overlay's os_log function.

Observed Results: I cannot.

Version: Xcode Version 9.0 beta 2 (9M137d)

Notes: See also: https://github.com/apple/swift/blob/master/stdlib/public/SDK/os/os_log.swift#L23

The extra function would have an identical implementation, just a different prototype. Heck, I might just PR it and reference this radar.

Allowing this kind of composition can allow developers to:

Configuration: N/A

- Product Version: Xcode Version 9.0 beta 2 (9M137d) Created: 2017-07-09T20:19:12.486240 Originated: 2017-07-09T16:18:00 Open Radar Link: http://www.openradar.me/33203955

jaredsinclair commented 6 years ago

Any follow up on this?