Swiftpack.co - b9swift/MulticastDelegate as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by b9swift.
b9swift/MulticastDelegate 1.1.1
MulticastDelegate in a satisfied implementation.
⭐️ 3
🕓 1 year ago
.package(url: "https://github.com/b9swift/MulticastDelegate.git", from: "1.1.1")

B9MulticastDelegate

Swift Version Swift Package Manager Build Status gitee 镜像 GitHub Source

Multicast delegate is a delegate that can have more than one element in its invocation list.

Installation

Use Swift Package Manager or import manually.

你也可以使用 gitee 镜像

Features

  • NSHashTable free. It brings better performance and support for Linux.
  • MulticastDelegate confirms Sequence, which means that lots of sequence features are available.
  • Thread safe.
  • Other delightful details, eg: error handling optimization, debug log optimization.

Background

I'm a big fan of the multicast delegate. I have "invented" and used it since 2014.

As Swift’s ABI is stabilized, it's time to move a Swift implementation.

But I cannot find a satisfied implementation everywhere. So I write one.

Alternatives

  • jonasman/MulticastDelegate - Use NSHashTable. Operator overloading is not a good idea, in my opinion. It is not intuitive and reduces readability. API does not meet design guidelines (Omit needless words).
  • elano50/MulticastDelegateKit - Use NSHashTable.
  • Kevin Lundberg's - Generic type should not be AnyObject. API does not meet design guidelines (Omit needless words).
  • Greg Read's - Missing duplicate check when adding. API does not meet design guidelines (Omit needless words). I dislike removing when invoking.
  • Ivan's - Missing duplicate check when adding. It is odd to use an equatable weak wrapper to check duplicates.

GitHub

link
Stars: 3
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Release Notes

2022
1 year ago
  • Just a little documentation update.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics