6 ms·
My problem with C++ isn't the lack of borrow checker - this is the feature I like the least in Rust (I know it's their core design goal but frankly the inconven
by rubber_duck 7y ago
My problem with C++ isn't the lack of borrow checker - this is the feature I like the least in Rust (I know it's their core design goal but frankly the inconvenience and limitations it imposes don't seem worth it for my use case, and then theres the compile times).
C++ lack of modules and package management on the other hand is a huge PITA and I'm not optimistic either of those bolted on so late in to the language lifecycle will provide a useful solution.
It's a pity D took it too far in the other direction with GC and runtime - I really could use a C with classes and modules.
- abraxaz 7y agoI think conan has real potential when it comes to package management Some example of what can be done with it https://gitlab.com/xadix/xonan https://gitlab.com/xadix/xonan It is kind of like gentoo portage or nix pkg and can be used to manage your tool chain also
- plq 7y agoI don't get conan. Portage can already create a linux root in your homedir (see the prefix project) and has a huge package repo. What am I missing?
- ComputerGuru 7y agoI find vcpkg to be a much more well thought out solution, or at least did at the time I was doing research into suggesting one for neovim during that discussion. It was clearly developed by a team that’s been around the proverbial dependency management block a few times, and offered more accommodations for working with existing codebases than Conan did.
- colatkinson 7y agoI could be wrong, but conan's "killer feature" is its integration with traditional artifact management solutions. Using it with Nexus (which also takes care of PyPI, npm, and basically every other binary package type under the sun) is fairly smooth sailing. vcpkg, on the other hand, as far as I know only exports to nuget and compressed archives. Nuget is great and all if you're purely in MS land, but otherwise... not so much. And with compressed archives, you're kinda on your own w.r.t versioning and so on. That being said, I'm much more familiar with conan, so please correct me if I'm wrong. Additionally, conan, being configurable via normal Python code (for better or worse), can really hack together pretty much any codebase (I've used it with autotools, MSBuild, CMake, and even Xcode). I will definitely agree that the vcpkg team does ultimately seem to be more experienced, and it's a more polished tool (the conan docs are... lacking in areas, and updating conan will occasionally break things). It'll be interesting to see the direction both tools go in the future, as I would really like cross-platform C++ dependency management to stop being a total PITA.
- pjmlp 7y agoModules are coming in C++20, with vcpkg and conan becoming the two most used package managers.
- jeremyjh 7y agoThey were coming in C++17 too.
- zone411 7y agoBack 2015, when the work on C++14 was still going on, it was already known that modules probably won't make into C++17. Very different situation now. https://botondballo.wordpress.com/2015/06/05/trip-report-c-standards-meeting-in-lenexa-may-2015/ https://botondballo.wordpress.com/2015/06/05/trip-report-c-s...
- pjmlp 7y agoThe set of ISO C++20 features is pretty much frozen after the upcoming Cologne meeting, and modules are in.
- wyldfire 7y agoSo the aforementioned death-on-arrival [1] was premature? Are there really implementations which end up faster as a result? [1] https://vector-of-bool.github.io/2019/01/27/modules-doa.html https://vector-of-bool.github.io/2019/01/27/modules-doa.html
- logicprog 7y agoI recently found out[2] about DasBetterC[1] and it seems like a super convincing way to get just C with classes and modules, as you say. Essentially, it removes the runtime and all the features that rely on it. [1]: https://dlang.org/blog/the-d-and-c-series/#betterC https://dlang.org/blog/the-d-and-c-series/#betterC [2]: https://theartofmachinery.com/2019/04/05/d_as_c_replacement.html https://theartofmachinery.com/2019/04/05/d_as_c_replacement....
- mhh__ 7y agoD is perfectly usable as a C with classes and modules if you use the -betterC flag, with optional lifetime checking if you want it (@safe)
- paulddraper 7y ago> C++ lack of modules and package management What exactly does "modules" mean to you? JS modules, Ruby modules, Java modules, Python modules? Those are substantially different ideas. C++ namespaces are Ruby modules, sans inheritance and runtime representation. > package management Does every language now require its own bespoke package management? npm, gem, pip, CPAN, OPAM, composer, maven, ivy, NuGet, Cabal, Cargo, CocoaPods, Quicklisp, LuaRocks, CTAN, Anaconda, etc.
- themusicgod1 7y agoNot to mention you can get software that is unlicensed on npm, and god knows what gets pulled in when you use cargo or any of the smaller ones. This is a gigantic clusterfuck for those who are interested in using free software that encourages the user to be aware of the importance of free software.
- steveklabnik 7y agocrates.io (for Cargo) requires that every package include a SPDX identifier, and there's tools that can show you what licenses are used in your project.
- pjmlp 7y agoYes it does, because most of us want to support a single package format, not one per OS. Get every OS to agree on an universal package manager and then we may get rid of language specific ones that work across all OSes.
- paulddraper 7y agoLanguage-based systems are very limiting. Want to use OpenSSL in your Rust project? Cargo won't/can't get you what you need.
- steveklabnik 7y agohttps://crates.io/crates/openssl https://crates.io/crates/openssl ?
- de_watcher 7y agoJust using package management of the OS distribution. An with the GUI going into Web it then just installs into some kind of Docker image anyway.