Swiftweekly.github.io: [144] Issue #144 - September 26, 2019

Created on 12 Sep 2019  ·  26Comments  ·  Source: SwiftWeekly/swiftweekly.github.io

To contribute to this issue, simply leave a comment here. Please also review our contributing guidelines.

The current draft for this issue in _drafts/. If you want to contribute directly, feel free to open a pull request.

full issue notes

Most helpful comment

All 26 comments

Proposal: emitting source information file during compilation

Swift module files do not store the source locations (file:line:column) of their declarations. While this is by design, the lack of source location information has certain downsides:

  • A tool that runs during a build and processes Swift module files (like the ABI checker) cannot emit diagnostics that can point to the source location where a declaration is written
  • The compiler itself cannot emit diagnostics pointing to user code if the declaration was imported from another module

https://forums.swift.org/t/proposal-emitting-source-information-file-during-compilation/28794

A tuple conformance idea

This just popped into my head today. What if we could combine the ideas of:

  • withoutActuallyEscaping(_: do:)
  • AnyHashable

to work around slapping protocols onto tuples?

https://forums.swift.org/t/a-tuple-conformance-idea/28919

Partial sorting?

Just cruising the C++ algorithm list and wondered about std::partial_sort and std::nth_element

@natecook1000 :

Thanks for bringing these up, @CTMacUser — we probably will eventually want both of the C++ algorithms in the standard library. Partial sorting is more efficient than sorting a whole collection if you only need the smallest n of your elements.

https://forums.swift.org/t/partial-sorting/28941/7

‘FrameworkName’ is not a member type of ‘FrameworkName’ errors inside swiftinterface

I've been trying to create a XCFramework and having some difficulties with the .swiftinterface file that presents error.

@jrose-apple wrote:

it's a longstanding bug/limitation in Swift that if you have a type and a framework with the same name, the name is always assumed to refer to the type. @brentdax is looking at some alternate ways to provide a module name in Pitch: Fully qualified name syntax that the module interface generator will be able to use; for now, though, you can work around this issue by renaming either your framework or the type in it.

https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962/3

Avoid curly brackets on single line bodies and computed properties

https://forums.swift.org/t/avoid-curly-brackets-on-single-line-bodies-and-computed-properties/28954

Pull request by @mattt making Swift repository Swift again.

Review Scheduled: Standard Library Preview Package

The standard library preview package proposal is set to run Monday Sept 23...Monday Sept 30. I'll initiate the review thread on Monday.

https://forums.swift.org/t/review-scheduled-standard-library-preview-package/29008

https://forums.swift.org/t/se-0264-standard-library-preview-package/29068

Review Scheduled: Standard Library Preview Package

You're too quick 😝

That's 0264, to note :)

[Enum] Allow to init/assign a case with another case of the same enum (for aliases)
https://forums.swift.org/t/enum-allow-to-init-assign-a-case-with-another-case-of-the-same-enum-for-aliases/29043
&

Getting rid of case keyword for enum definition?
https://forums.swift.org/t/getting-rid-of-case-keyword-for-enum-definition/29044

Sent with GitHawk

As always great video from @twostraws https://www.youtube.com/watch?v=tF47KiiAU_0

5 small but significant improvements in Swift 5.1 by @johnsundell

https://www.swiftbysundell.com/articles/5-small-but-significant-improvements-in-swift-5-1/

Swift 5.1 is now available on https://hub.docker.com/_/swift for Ubuntu 18.04 and Ubuntu 16.04!

https://twitter.com/mishaldshah/status/1176280650308968448

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jessesquires picture jessesquires  ·  8Comments

jessesquires picture jessesquires  ·  10Comments

jessesquires picture jessesquires  ·  5Comments

jessesquires picture jessesquires  ·  10Comments

jessesquires picture jessesquires  ·  9Comments