The last example illustrates that concurrency is complex no matter what language you use - the code ends up reflecting the scaffolding enabling concurrency and the actual work ends up buried inside.
That said, I like what I see.
21–30 of 94 posts
The last example illustrates that concurrency is complex no matter what language you use - the code ends up reflecting the scaffolding enabling concurrency and the actual work ends up buried inside.
That said, I like what I see.
Earlier quoted context omitted.
C++ is not safe in the same sense that Rust is. Without the use of "unsafe", Rust is designed to never segfault or have undefined behavior, ever. Even a modern subset of C++ cannot make the same guarantees (consider iterator invalidation, etc.)
I'll gladly use modern C++ techniques and a bit of care, even if that means only getting say 90% or 95% of the safety that Rust potentially offers offers, if it also means that I can get my code written today, and I can trust that it'll still compile unchanged tomorrow, next week, and probably a decade from now. I think it's great what Rust could potentially offer software developers. But it's still pretty theoretica…
How much cognitive overhead is it to think about ownership all the time once you get used to it ? Coming from a GC-languages background I had a hard time thinking in those terms last time I played with it. I ended up having .clone() littered all over the place :)
When writing libraries, you will typically need to think about ownership more frequently than when writing applications, but it’s normally not at all problematic.
This is much more in depth + possibility of running code on site. I don't understand why rust site doesn't have links to this project.
Earlier quoted context omitted.
I'll gladly use modern C++ techniques and a bit of care, even if that means only getting say 90% or 95% of the safety that Rust potentially offers offers, if it also means that I can get my code written today, and I can trust that it'll still compile unchanged tomorrow, next week, and probably a decade from now. I think it's great what Rust could potentially offer software developers. But it's still pretty theoretica…
if C++ doesn't terrify you, you're probably using it too much. C++ is the most complex programming language ever invented.
C++ gives you immense power and a huge range of functionality to choose from, and some of the complexity arises from this. It has a very long history, which also contributes to the complexity. And it's first and foremost a pragmatic language, which of course brings in some complexity in order to deal with the inherent complexity of reality.
If something is seen as "complex" in C++, there's usually a good, or at least understandable, reason for this. You can usually find technical documents or discussion that justify why things are they way that they are, and the reasoning is usually quite sound. And in many cases, it's possible to safely ignore or just not use large portions of the complexity that C++ offers without facing any sort of a penalty or harm.
It's very different from the complexity that languages like JavaScript or PHP bring. The complexity there is usually unjustifiable, and often due to very rushed work, a lack of understanding and poor design, or a lack of care and consistency. They suffer from serious flaws and complexity that were not justified when introduced, and were subsequently not cleaned up or fixed once recognized. They suffer from harmful complexity, while C++ offers beneficial complexity.
Earlier quoted context omitted.
C++ is not safe in the same sense that Rust is. Without the use of "unsafe", Rust is designed to never segfault or have undefined behavior, ever. Even a modern subset of C++ cannot make the same guarantees (consider iterator invalidation, etc.)
I'll gladly use modern C++ techniques and a bit of care, even if that means only getting say 90% or 95% of the safety that Rust potentially offers offers, if it also means that I can get my code written today, and I can trust that it'll still compile unchanged tomorrow, next week, and probably a decade from now. I think it's great what Rust could potentially offer software developers. But it's still pretty theoretica…
Frankly, probably the best introduction to Rust is "Rust by example" [1] This is much more in depth + possibility of running code on site. I don't understand why rust site doesn't have links to this project. [1] http://rustbyexample.com/
Earlier quoted context omitted.
C++ is not safe in the same sense that Rust is. Without the use of "unsafe", Rust is designed to never segfault or have undefined behavior, ever. Even a modern subset of C++ cannot make the same guarantees (consider iterator invalidation, etc.)
I'll gladly use modern C++ techniques and a bit of care, even if that means only getting say 90% or 95% of the safety that Rust potentially offers offers, if it also means that I can get my code written today, and I can trust that it'll still compile unchanged tomorrow, next week, and probably a decade from now. I think it's great what Rust could potentially offer software developers. But it's still pretty theoretica…
Given the practical history of C++ implementations, this may be rather optimistic... Though it does seem to be calming down a bit. Unfortunately, my first real work with C++ was with GCC2.96 (the phantom Redhat version of GCC); scarred me for life :)
Frankly, probably the best introduction to Rust is "Rust by example" [1] This is much more in depth + possibility of running code on site. I don't understand why rust site doesn't have links to this project. [1] http://rustbyexample.com/
This is Hacker News, so I'll explain it to you this way: this is specifically _not_ in depth. Have you ever done sales? The idea is that you need to figure out if your customer wants to buy as quickly as possible, and if they don't, move on. If they do, _then_ you move into the longform stuff. If your customer isn't going to buy, it wastes both you and their time.
The idea of this short introduction is to split you into one of two camps: "I want to know more about Rust," or "ewww." If you're in camp one, heading over to the tutorial or Rust by Example is great!
I've only ever used GCed (and largely dynamic) languages up until now (Python, JS and Clojure primarily); C is alien and C++ is frankly terrifying. With all that, I've been having a ball using Rust to solve Project Euler problems, with astonishing speed compared to what I'm used to. It doesn't quite have all the libs you might want for general development yet, but for the things it's currently equipped for it's a lot…