6 ms·
Why managed when it could be in Rust and have both performance and safety? The Servo shouldn't have ever been laid off. Yes, I'm aware a team is working on it
by SoothingSorbet 2y ago
Why managed when it could be in Rust and have both performance and safety?
The Servo shouldn't have ever been laid off. Yes, I'm aware a team is working on it now, but it isn't up to the same speed and enthusiasm as it was when funded by Mozilla, is it?
- high_na_euv 2y agoIm aware of Rust, but there is C#/Java too, with way bigger ecosystem, community and lower entry level. At the end of the day web browser is just bunch of parsers and compilers working together, and some video/audio
- eqvinox 2y agoServo exists, in Rust. I don't know of any browser engine in C#/Java? Also, modern browsers as a whole outsize entire OSes (sans browser)...
- cesarb 2y ago> I don't know of any browser engine in C#/Java? A famous one is HotJava. According to Wikipedia, it was also the first web browser to support Java applets.
- Yoric 2y agoIt was also a mess :)
- eqvinox 2y ago> A famous one is HotJava. "Final release: Late 2004; 20 years ago" I guess I should've specified "not completely and utterly dead"? ;D (Also, the size and complexity of a browser at that point in time was arguably still a whole lot less than a modern one)
- Ygg2 2y ago> At the end of the day web browser is just bunch of parsers and compilers working together At the end of the day, OS is just a bunch of command lines being piped together. /sarcasm Sure, you are just missing: rendering, layout, security, network traffic for sockets, low-level control over hardware, writing a decent enough VM, image processing, video playback, music playback, compression, decompression, self-update, decryption, don't forget add-ons people love add-ons, also add-on security and isolation, web edit and debug tools, network analysis tools, etc. You know, little things.
- high_na_euv 2y agoWhy would you need to reinvent networking layer instead of just sending http requests via matrue, battle tested lib available in your programming ecosystem e.g from MSFT? Same with crypto, sockets, compression, etc? Video and audio I mentioned. Extensions are tricky, right, but more from privacy standpoint cuz after all you can just expose too much
- Ygg2 2y ago> Why would you need to reinvent networking layer instead of just sending http requests via matrue, battle tested lib available in your programming ecosystem e.g from MSFT? Because modern browsers are essentially cross-compatible OSes.
- high_na_euv 2y agoSo is .net
- eqvinox 2y agoYou've clearly never tried to use .net on a non-MS OS. Sure, it's possible. But it's also a royal pain, at least last time I checked.
- high_na_euv 2y ago
- sunshowers 2y agoThe problem with writing a browser in C# or Java is that neither of them can provide anywhere close to the level of thread safety that Rust does.
- chii 2y agoboth java and c# has thread safety primitives that are also pretty easy to use. E.g., the java concurrency package.
- om8 2y agoThe cool thing about rust is that it forces you to use thread safety primitives. It's called fearless concurrency
- Yoric 2y agoHaving done concurrency in Java and Rust, my experience is that Rust's concurrency primitives are an order of magnitude better than Java's. I haven't tested C#'s.
- sunshowers 2y agoNo, that's not what I'm talking about. C# and Java have nothing like the Send and Sync traits, and they don't have & and &mut.
- neonsunset 2y agoC# doesn't have Send and Sync that is true. It frequently does not need either because it uses GC instead of affine types for automatic memory management. Synchronization is indeed "just don't write bugs", where Rust offers a massive upgrade, but .NET CoreCLR's memory model is more strict than C one, like object reference assignment having release semantics, so quite a few footguns are luckily avoided: https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md https://github.com/dotnet/runtime/blob/main/docs/design/spec... '&' and '&mut', however, are your 'ref readonly' and 'ref' respectively.
- Malidir 2y agoMicrosoft are re-writing c# stuff in Rust! https://news.ycombinator.com/item?id=39240205 https://news.ycombinator.com/item?id=39240205
- Yoric 2y ago> At the end of the day web browser is just bunch of parsers and compilers working together, and some video/audio That's... an interesting reduction :) I guess it's about as true as saying that the Linux Kernel is a bunch of I/O and a scheduler?