Earlier quoted context omitted.
When I see people on my team (myself included) shoot themselves in the foot over and over with C++, sometimes causing very costly production bugs, and yet I know of a tool that could have prevented nearly all of that pain at compile time, I am going to risk being disliked in order to help lift everyone up. Most people that I mentor on Rust have become completely sold on it after some initial resistance. I don't like…
I think that argument makes sense in a vacuum. Like considering nothing else, yes, 100%, rusts compiler prevents more bugs then c++ would. I don't think bugs are the only way to waste time or break things. In a large company or complex project your never talking about one small code base. There are inter-dependencies within code and outside code. Rewriting all of anything significant is a huge undertaking. In reality…
Microsoft seeks Rust developers to rewrite core C# code
221–230 of 256 posts
Re: Microsoft seeks Rust developers to rewrite core C# code
#222Earlier quoted context omitted.
There aren’t a lot of memory safe options if you want the kind of performance rust offers. Rust is fine, but it’s far from perfect. It’s hard to learn, complex, and the macro and async systems are honestly a bit of a mess. I’m really looking forward to whatever comes after rust. I’m hoping some bright sparks out there manage to make a language with rust’s memory safety but that cleans up some of rust’s rough edges.
To be fair, how many applications really need Rust's level of performance? I mean operating system code and drivers... But, many apps are getting the job done in electron with a browser engine. I like rust, I like the sensibilities. Maybe my experience is too limited to higher level problems though. There's plenty of room for the likes of Go, Java and C# is all I'm getting at.
But the software which does need or want "native performance" is incredibly important software. I'd use rust for things like databases, operating systems, web browsers, high performance web servers, network services (samba, ssh), and other "systems" software like that.
Most of the lines of code ever written are probably in application code. If you're making a company website, python or C# or whatever is totally fine. But a remarkable proportion of the lines of code your computer actually runs were written in C or C++. Your web server might be in python, but if you use nginx as a proxy - well, thats C++ (I think). Use postgres? C++. Running your software in linux? C. Testing with Chrome? C++. What is python itself written in? I dunno, but I bet its either C or C++. You get the picture.
Whether or not rust is a big deal is largely a matter of focus.
Re: Microsoft seeks Rust developers to rewrite core C# code
#223Earlier quoted context omitted.
If you're going to start writing it testing or C++ like Rust or follow certain guidelines, a lot of them. But if you're going to constrain how you do things, why not use a language that also gives you higher level functionality along the way?
I agree. My point is that I just feel like "but someone please think of the ̶ ̶c̶h̶i̶l̶d̶r̶e̶n̶ memory safety" argument is over blown. There are ways to eliminate majority of those issues in cpp as well, but people simply don't care. If You want to use Rust because it's just better language - go for it, I do it as well. But let's actually use that as an argument, instead of hiding behind superficial ones
If its that easy, why do Google, Apple, Microsoft and basically everyone else keep making memory safety related bugs? Are they all just idiots? Do you think they just don't care about security? Carmack found C++ static analysis tools found mountains of latent bugs in the quake source code - despite the game running great.
Personally I find it a very arrogant statement to claim that memory safety in C++ is easy. If google finds it hard, despite throwing millions each year into the problem, I'm of a mind to believe them.
Re: Microsoft seeks Rust developers to rewrite core C# code
#224Earlier quoted context omitted.
n=1 but I did bring Rust to my C++ job. I needed a web server, and I didn't want to put in an order with the web server team, and writing a web server in C++ looked like a recipe for pain.
What pain? Just include mongoose.h and .c in your project. It's in C, but C is C++.
Re: Microsoft seeks Rust developers to rewrite core C# code
#225Earlier quoted context omitted.
n=1 but I did bring Rust to my C++ job. I needed a web server, and I didn't want to put in an order with the web server team, and writing a web server in C++ looked like a recipe for pain.
docker run --name docker-nginx -p 80:80 nginx
Re: Microsoft seeks Rust developers to rewrite core C# code
#226Earlier quoted context omitted.
n=1 but I did bring Rust to my C++ job. I needed a web server, and I didn't want to put in an order with the web server team, and writing a web server in C++ looked like a recipe for pain.
Really people write a web server from scratch? What industry? Don’t tell me it’s some CRUD
Re: Microsoft seeks Rust developers to rewrite core C# code
#227Earlier quoted context omitted.
Considering the Microsoft consumer software that burns cycles to do trivial things (Teams, OneDrive, pick your favorite example). I do not think language performance should be a compelling argument.
There's a difference in resources on client machines and resources on thousands of servers in server farms.
Re: Microsoft seeks Rust developers to rewrite core C# code
#228Earlier quoted context omitted.
Depends on the language and platform/Runtime... For C# a single executable over a directory of files. For that and Java, a massive runtime, generally slow cold starts, high initial memory use, reduced relative effectiveness for smaller platforms (RPi and similar). For JavaScript and Python, slow introp, in addition to the negatives above. It's also possible to leak memory like a sieve in any language.
- Native interop in Java is surprisingly slow and very clunky (C# interop with C/C++ can be as cheap as direct calls nowadays) - .NET had been able to produce single-file (and self-contained when needed) executables way before NativeAOT was introduced - RPi is a fairly large platform compared to e.g. Arduino (for which Rust should be awesome) and can be well-served by NativeAOT ( today ). I might still use Rust for t…
On the single executable, my understanding is it sad kind of like a self extracting archive that extracted and ran... Meaning slower start times and the need for write access to the file system... Not to mention the framework still needed to be installed. And only more recently was true single executable possible.
Re: Microsoft seeks Rust developers to rewrite core C# code
#229Earlier quoted context omitted.
There's a pretty good YouTube video I saw pulling all the types of strings in rust. I find it confusing still... Been wanting to do a few things that would mean dealing with it streams that could be cp437 or utt8, generally and haven't been quite sure how I want to deal with it.
Either Vec or https://github.com/BurntSushi/bstr
Basically a BBS door running service, with some extra niceties internally.