GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Doug Gregor (dgregor79@sfba.social)'s status on Tuesday, 16-Jan-2024 07:56:09 JST Doug Gregor Doug Gregor

    Finally landed the first of many #SwiftLang standard library updates to replace "rethrows" with generic typed throws: https://github.com/apple/swift/pull/69771. The feature has been a fantastic exercise in generalizing in place: it maintains the same behavior for existing Swift code, maintains the stable ABI of the standard library, and yet any Swift code that adopts typed throws will see typed errors propagate through the standard library in the natural way.

    In conversation Tuesday, 16-Jan-2024 07:56:09 JST from sfba.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
      Replace rethrowing map with generic typed throws by DougGregor · Pull Request #69771 · apple/swift
      Adopt typed throws for the map operation to propagate thrown error types through the map API. The new map has a signature like this: public func map( _ transform: (Element) throws(E) ->...
    • Embed this notice
      Paul Cantrell (inthehands@hachyderm.io)'s status on Tuesday, 16-Jan-2024 07:57:38 JST Paul Cantrell Paul Cantrell
      in reply to

      @dgregor79 Still love this work and how the proposal landed in the end. A real software community success story!

      In conversation Tuesday, 16-Jan-2024 07:57:38 JST permalink
    • Embed this notice
      Doug Gregor (dgregor79@sfba.social)'s status on Tuesday, 16-Jan-2024 07:57:39 JST Doug Gregor Doug Gregor
      in reply to

      If you're interested in how typed throws manages to generalize #SwiftLang's error handling to provide more expressive APIs, check out the accepted design proposal at https://github.com/apple/swift-evolution/blob/main/proposals/0413-typed-throws.md.

      In conversation Tuesday, 16-Jan-2024 07:57:39 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        https://github.com/apple/swift-evolution/blob/main/proposals/0413-typed-throws.md
    • Embed this notice
      Doug Gregor (dgregor79@sfba.social)'s status on Tuesday, 16-Jan-2024 07:57:40 JST Doug Gregor Doug Gregor
      in reply to

      Another, simpler example is Swift's Result type, which has always effectively had typed errors because it's generic over the "Failure" type. However, any interaction between Result and errors in the language (e.g., an actual throw or do..catch) would have to erase to "any Error". Now, we can express the relationship between the "Failure" type and error handling, allowing one to smoothly go between throw/do..catch and Result: https://github.com/apple/swift/pull/70907

      In conversation Tuesday, 16-Jan-2024 07:57:40 JST permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        [SE-0413] Adopt typed throws in Result by DougGregor · Pull Request #70907 · apple/swift
        Make init(catching:) and get() use typed throws. The former infers the Failure type from the closure provided (once full type inference is in place) and the latter only throws errors of the Failure...

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.