Pledge is a lightweight reactive programming framework for Swift designed to be simpler and more performant than RxSwift. It aims to provide a more accessible entry point to reactive programming by offering a reduced API surface, focusing on core functionalities like observables, operators, and subjects. Pledge avoids the overhead associated with RxSwift, leading to improved compile times and runtime performance, particularly beneficial for smaller projects or those where resource constraints are a concern. The framework embraces Swift's concurrency features, enabling seamless integration with async/await for modern Swift development. Its goal is to offer the benefits of reactive programming without the complexity and performance penalties often associated with larger frameworks.
OpenBSD has contributed significantly to operating system security and development through proactive approaches. These include innovations like memory safety mitigations such as W^X (preventing simultaneous write and execute permissions on memory pages) and pledge() (restricting system calls available to a process), advanced cryptography and randomization techniques, and extensive code auditing practices. The project also champions portable and reusable code, evident in the creation of OpenSSH, OpenNTPD, and other tools, which are now widely used across various platforms. Furthermore, OpenBSD emphasizes careful documentation and user-friendly features like the package management system, highlighting a commitment to both security and usability.
Hacker News users discuss OpenBSD's historical focus on proactive security, praising its influence on other operating systems. Several commenters highlight OpenBSD's pledge ("secure by default") and the depth of its code audits, contrasting it favorably with Linux's reactive approach. Some debate the practicality of OpenBSD for everyday use, citing hardware compatibility challenges and a smaller software ecosystem. Others acknowledge these limitations but emphasize OpenBSD's value as a learning resource and a model for secure coding practices. The maintainability of its codebase and the project's commitment to simplicity are also lauded. A few users mention specific innovations like OpenSSH and CARP, while others appreciate the project's consistent philosophy and long-term vision.
Summary of Comments ( 2 )
https://news.ycombinator.com/item?id=43641576
HN commenters generally expressed skepticism towards Pledge's performance claims, particularly regarding the "no Rx overhead" assertion. Several pointed out the difficulty of truly eliminating the overhead associated with reactive programming patterns and questioned whether a simpler approach using Combine, Swift's built-in reactive framework, wouldn't be preferable. Some questioned the need for another reactive framework in the Swift ecosystem given the existing mature options. A few users showed interest in the project, acknowledging the desire for a lighter-weight alternative to Combine, but emphasized the need for robust benchmarks and comparisons to substantiate performance claims. There was also discussion about the project's name and potential trademark issues with Adobe's Pledge image format.
The Hacker News post discussing Pledge, a lightweight reactive framework for Swift, has generated a moderate amount of discussion, with several commenters expressing interest and raising pertinent questions.
One of the most compelling threads revolves around the performance comparisons between Pledge and Combine, Apple's built-in reactive framework. A commenter questions the benchmark presented in the project's README, specifically pointing out that Combine's performance is known to be suboptimal when dealing with a large number of subscribers and frequent updates. They suggest that a more realistic benchmark would involve scenarios with a substantial subscriber count and rapid value changes to accurately gauge Pledge's performance advantage. The author of Pledge responds to this, acknowledging the feedback and indicating their intention to incorporate more comprehensive benchmarks in the future. They also discuss the inherent difficulties in creating a completely fair comparison given the differences in the frameworks' architectures.
Another significant point of discussion is the project's scope and goals. A commenter asks whether Pledge intends to be a full-fledged reactive framework like Combine or a more focused solution addressing specific use cases. The project author clarifies that Pledge prioritizes simplicity and performance, aiming to provide a lightweight alternative for common reactive patterns without the complexity and overhead of Combine. They emphasize that Pledge isn't designed to be a complete replacement for Combine but rather a more streamlined option for specific scenarios.
Several commenters express general interest in the project and commend its approach. Some suggest potential improvements, including exploring alternative implementation strategies and considering compatibility with Swift's existing concurrency features.
Finally, there's a brief discussion regarding the project's license. A commenter notes the absence of a license file and inquires about the intended licensing terms. The author promptly addresses this by adding an MIT license to the repository.
Overall, the comments on the Hacker News post reflect a positive reception of Pledge. The discussion focuses primarily on performance comparisons with Combine, the project's overall goals, and potential areas for improvement. The author actively engages with commenters, addressing their questions and demonstrating a willingness to incorporate feedback.