Rust’s package manager doesn’t manage c++, python, or anything else. Since the real world should not be one language to rule them all any package system must handle all possible languages. Otherwist they are lacking.
A programmer with an interest in transit, making music, and building things of all types.
I have dysgraphia which makes writing difficult for me. I hope you can figure out what I mean despite my issues.
Rust’s package manager doesn’t manage c++, python, or anything else. Since the real world should not be one language to rule them all any package system must handle all possible languages. Otherwist they are lacking.
I said this is a hard problem and might not even be solvable.
rust is not better than C++ if you are in any of those cases where rust doesn’t work. Not really worse, but not better either. If it works for you great, but it is worse for me as rust fight our homegrown system (which has a lot of warts )
Dependency management has to deal with the real world where what we didn’t know in 1970 hurts us.
I was a lot more productive in C++ 15 years ago when the current project was 100% greenfield. Now that the code is 15 years old I’m much less productive because over the years we have discovered mistakes we made. I suspect I’m still more productive than the average C++ programmer because 15 years ago modern C++ was known (c++11 was still a couple years away though) and so we didn’t do a lot of the mess that people hate on C++ for.
Which is to say I want to know how productive those programmers will be in 15 years when the shiny of rust has warn off and they are looking at years of what seemed like a good design but current requirements just don’t fit.
Added on top of that is a modern dependency management system that is severely needed in languages like C and C++
I won’t disagree, but what Rust did is not the correct answer. Better than C++ perhaps, but not good enough. In the real world my code is more than Rust. I’m having trouble using rust because all my existing code is C++ and the dependency management does not work well with my existing build system and dependency management. If you want a dependency manager it needs to cover all languages and be easy to plug in whatever I’m doing currently. This is NOT an easy problem (it might not even be possible to solve!), but if you fail you are useless for all the times where dependency management is hard.
Unfortuately c++ interoperability is hard. I wouldn’t write c++ without vector and other containers (templates). Or classes complete with inheiritance (rarely multiple) and thus name mangeling. I now have millions of lines of that stuff and it is hard to write anything else because it has to mix.
Crying over some C code I have to work with. I’m supposed to do a quick proof of concept but with all data passed by global variable.
C, because I can find a compiler or interpreter for other language written in C (I may need to run a few steps to get there), and thus work around your silly and nonsense question. Seriously, I use multiple languages because there is no one true language to rule them all. I use C++ for problems where bash would be wrong, and bash where C++ would be wrong. And some python, cmake, lua mixed in for good measure. I’m looking at Rust to add (rust doesn’t like the way our system designed so it is hard to figure out how to implement it)
I have garage collection in C++. Unique-ptr takes care of almost all my needs (and the exceptions are places where I need to subvert the system and so other garbage collection is a non starters) There is a lot more to memory safety than garbage collection though.
Memory safety does not require garbage collection. Rust doesn’t have garbage collection and is memory safe because they annotate the lifetime of each object so that you can’t have a use after free error - the only part of memory safety garbage collection helps with. Memory safety is also about not accessing past the end of a buffer, and garbage collection does nothing to help you here. There are a number of other memory safety issues that garbage collection doesn’t help with. (most garbage collected languages also give you those things, but it isn’t the garbage collector doing that work)
Is there a language other than rust that is memory safe? I’m using C++ for good reason, and while rust does have some things I find intriguing, those who have experimented where I work have returned to modern c++ (I have not been able to figure out why). What other alternatives do I have that compile to fast code, have a wealth of libraries, and interoperate well with my existing C++?
I broke the one definition rule by having a symbol in two different .so files. The optimizer can’t optimize around this and on Linux the order of loading says who wins. On windows there are different rules, but I forget which.
Of course if the optimizer could make an optimization I would be in trouble, but my build systems ensures that there is no optimizer that gets access to either definition.
https://lists.isocpp.org/std-proposals/2023/08/7587.php gives one example where it does. Rust defines what happens for a case that is clearly nonsense, thus rust needs check for that case (on processors where the CPU does something different) even though if you get into it you have a bug in your code.
I’ve been writing C++ for years and I have yet to be burned by undefined behavor. And because it exists the compiler doesn’t have to insert some slow if checks for places my code could do different things on different systems.
I run undefined behavior sanitizer on everything. The only time it has ever complained was a case where my platform does define the behavior and I was intentionally relying on that.
That is best for a small team who work in the same office space. However if you have someone who works remote, you are a large team, or you are the manager of the team it has limitations.
I.prefer to count and report total tests run as part of each build. We get impressive large numbers, but there is no way to put any specific goal on the exact number, we can always go higher.
my python doesn’t need to parse to pass cI, at least to long as I don’t write tests that run that code section. Checkmate all languages that have to compile. /s