|
Posted
4 months
ago
The implementation of Nix functional package manager from nixos.org relies on Boost libraries Container, Context, Coroutine, Core, Format, LexicalCast, Unordered and URL.
https://nixos.org/https://github.com/NixOS/nixhttps://www.boost.org/
|
|
Posted
4 months
ago
Since 2013, I have been working on libraries that implement open multi-methodsin modern C++. After releasing the first one - YOMM11 - I asked on the Boostmailing list if there was an interest in bringing YOMM11 into Boost. Back thenthere was not
... [More]
much.
I made another attempt when I released the much improved YOMM2, but interest wasstill feeble. Or maybe I did not explain what it was about well enough.
Anyway, I continued improving YOMM2 as a stand-alone project, and, inretrospect, I now think that it was for the best, at the time. YOMM2 had a bunchof users, engaged enough to send me PRs, and did not cause much trouble in termsof bugs. As for its internals, let's say, they looked like an experiment inprogress.
Over the years, though, I cleaned up the implementation. Following discussionson reddit, I raised the bar in terms of features, performance, footprint, etc.For example, I added support for custom RTTI.
I talked about YOMM2 at conferences once in a while. In 2024, I attended "usingstd::cpp", organized by Prof J.D. Garcia at the Universidad Carlos III inMadrid. Joaquín M López Muñoz was giving a talk about perfect hashing, atechnique that is used in YOMM2. Prof Garcia introduced me to Joaquín, and I toldthem the story of my library, and about my interactions with the Boostcommunity.
It turned out that Joaquín was a Boost author himself. He suggested that I tryagain, offering to endorse me. That would secure me a formal review. I said Iwould think about it.
I decided to go ahead for several reasons. I admit that vanity was one of them!But I also had "better" motives. I felt that I was not having a lot ofsuccess making the C++ community aware of my work. I figured having it in Boostwould help. The most important reason was...well, I am 62, with a couple ofhealth issues. Probably I'll still be around for some time, but, just in case, Iwould like to give my library a chance to outlive me, as long as possible. AndBoost has been very good at conserving C++ libraries, even as authors andmaintainers come and go.
Dmitry Arkhipov, a member of C++ Alliance (like Joaquín), offered to manage thereview. It turns out that he needed open multi-methods in a past project. Hewould have used YOMM2, if only he had known that it existed.
I did another round of cleanups, during which I moved some internals (like virtual_traits) to the public interface, refining them in the process.
Should the library be accepted, it would go by the name Boost.OpenMethod.
The review started. To be honest, I was steeling myself, expectingindifference. To the contrary, after a few days, comments, then formal reviewsstarted flowing in (a formal review must follow a format, in particular it mustclearly vote "accept", "accept with conditions", or "reject").
All the comments, reviews, and the debates they triggered, were veryinteresting. They honed my designs further. For example, I redesigned the policysystem (an important set of customization points that supports things likecustom RTTI).
Only one reviewer voted for rejection. Nonetheless, the conversation with himwas just as stimulating. Like others, and more strongly than others, hecriticized a feature that I ended up relegating to an opt-in.
I will try to describe it without going into too many details. My library isstrongly inspired by papers that Stroustrup and col wrote while attempting tobring open multi-methods into the C++ standard. In their last paper on thesubject (google for N2216), they suggest a treatment of ambiguities thatessentially makes them non-errors. I disliked the idea, and YOMM2 neverimplemented it, but I (sheepishly) adopted it for OpenMethod. And almost everybodydisliked it! Mistake avoided.
Some reviewers showed an astonishing grasp of low level details of theimplementation. I was delighted when Steven Watanabe dropped two pieces of codethat interface OpenMethod with Boost.Any and Boost.TypeErasure.
At the end of the review, OpenMethod was accepted with conditions - a fewchanges that I completely agreed with. But even if it had been rejected, it wouldhave been well worth the journey. OpenMethod is a much better library thanYOMM2. And it was accepted!
OpenMethod will join the flock in the Boost 1.90.0 release. [Less]
|