pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wip/pkgchkxx: a complete reimplementation of pkg_chk and pkg_rolling-replace
On 22/07/2023 18:44, PHO wrote:
In the beginning of my work I tried hard to stick with C. Yes, plain old
C. But I quickly got tired of its low-level nature. I am a Haskeller who
really doesn't like to code something complicated in a language just a
little bit convenient than ASM. So I decided to go with C++11, which is
still not as non-portable as Haskell, but... C++11 without Boost is
really a nightmare, and of course I didn't want the tool to depend on
Boost! So I switched to C++14 and realized that std::shared_ptr and
std::filesystem didn't exist in that version. This is how I ended up on
C++17. I knew people would hate me for requiring C++17 for the tool but
I thought it's okay as long as it stayed in wip :D
I can sympathise with not wanting to use C for such a utility but I was
a bit surprised you had to go to C++17 to get shared_ptr. That's been in
the C++ standard since c++11. And althought I've not done much C++ on
NetBSD I certainly didn't need c++17 to use it on linux so if you did on
BSD something is odd. You are right about filesystem and I can see why
that would be useful for a tool doing as much directory scanning as this
probably needs to.
C++17 should be supported by NetBSD 10-BETA onwards so its not exactly
an unreasonable tool choice. Although having a tool that works on at
least 9.x would be nice although that would be possible with a pkgsrc
GCC or clang. That said as the tool author it seems reasonable for you
to make the choice as to what to use.
Mike
Home |
Main Index |
Thread Index |
Old Index