Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Commitment to stability (Score 2) 149

You can build Rust programs and libraries that don't link to the standard library (as you can in C) This is very useful. Rust is pretty much the only language that lets you write complex safe code and still not link to any standard library (since its memory-safe competitors all require GC).

Comment Re:Commitment to stability (Score 2) 149

Your last sentence sums it up nicely. If you stick to the safe subset of Rust (which is almost the entire language, and enough to write almost all of a high-performance Web browser in, for example) then you can't trigger undefined behaviors, and references that claim to be non-null are guaranteed to really not be null. Escaping from that subset requires you to write the "unsafe" keyword.

OTOH C++ has nothing like that. It's very very easy in practice for C++ code to accidentally trigger undefined behaviors that can cause anything to happen, and there's no way to tell at compile time whether the code is safe.

Comment Re:Dosbox in a browser? (Score 5, Informative) 54

I'd say it's gotten a bit metaphysical at this point. The browser is is running the Javascript inside of a sandbox. This particular javascript file is a cross-compiled version of Dosbox, plus some API wrappers to make Dosbox think that it's running in Linux with SDL2. Dosbox in turn is emulating the CPU and hardware of a typical 386, as well as providing implementations of various DOS facilities.

Browser exploits exist (or at any rate have existed in the past, and may exist in the future; a 0-day may or may not exist at any given time), and most of them use Javascript in some way; this much is true. However, why write a DOS program that tricks Dosbox into tricking Emscripten into running that exploit when you could just run the exploit directly? This might be a great way to show off, but wouldn't be very practical.

Comment on designed for "security" (Score 1) 58

Systems submitted for evaluation under TCSEC B2 and better had to be designed for security - layering, TCB minimization, ... were all mandated in addition to support for trusted MAC functionality. When I am designing for "SECURITY" I want to simplify the critical protocols so that they can be described by a state machine and then implement them in silicon.

Comment Re:Ada (Score 1) 211

Rust offers manual memory management with automatic safety checking --- the language guarantees you don't leak memory, and you can't access an object after it's freed (assuming you don't opt into unsafe code). No other mainstream language, including Ada, offers that.

Slashdot Top Deals

"Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!" -- Buckaroo Banzai

Working...