Ivo Balbaert

  • Евгений Корнюшенкоhar citeretfor 2 år siden
    Moreover, Rust has the built-in functionality necessary for concurrent execution on multicore machines; it makes concurrent programming memory safe without garbage collection—it is the only language that does this. Rust also eliminates the corruption of shared data through concurrent access, also known as data races.
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    This enables programs to be fast, but it is inherently unsafe because the memory manipulations allowed by C and C++ are not checked for validity. If the code is written without the utmost programming discipline on the part of the developers, then program crashes, memory leaks, segmentation faults, buffer overflows, and null pointers can occur at program execution. Some of these can result in serious security vulnerabilities, which are all too well-known in existing browsers. Rust is designed from the ground up to avoid these kinds of problems
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    Rust (http://www.rust-lang.org/) is made to overcome this dilemma by providing the following features:

    High safety through its strong type system
    Deep but safe control over low-level resources (as much as C/C++) so that it runs close to the hardware
    Rust lets you specify exactly how your values should be laid out in memory and how that memory should be managed; this is why it works well at both ends of the control and safety line. This is the unique selling point of Rust: it breaks the safety-control dichotomy that, before Rust, existed in programming languages. With Rust, control and safety can be achieved together without losing performance
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    Rust is a compiled language: the strict safety rules are enforced by the compiler so that they do not cause runtime overhead. As a consequence, Rust can work with minimal runtime or even no runtime at all; so, it can be used for real time or embedded projects, and it can easily integrate with other languages or projects
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    In Rust, the typing of variables is static (because Rust is compiled) and strong. However, unlike Java or C++, the developer is not forced to indicate the types for everything as the Rust compiler is able to infer the types in many cases
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    C and C++ are known to be haunted by a series of problems that often lead to program crashes or memory leaks which are notoriously difficult to debug and solve. Think about dangling pointers, buffer overflows, null pointers, segmentation faults, data races, and so on. The Rust compiler (called rustc) is very intelligent and can detect all these problems while compiling your code, thereby guaranteeing memory safety during execution. This is done by the compiler by retaining complete control over memory layout, without needing the runtime burden of garbage collection (see Chapter 6, Pointers and Memory Safety). In addition, its safety also implies much less possibilities for security breaches
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    Rust compiles native code like Go and Julia. However, in contrast to these two, Rust doesn't need runtime with garbage collection. In this respect, it also differs from Java JVM and the languages that run on the JVM, such as Scala and Clojure. Most other popular modern languages such as .NET with C# and F#, JavaScript, Python, Ruby, Dart, and so on, all need a virtual machine and garbage collection
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    As one of its mechanisms for concurrency, Rust adopts the well-known actor model from Erlang. Lightweight processes called threads perform work in parallel. They do not share heap memory but communicate data through channels, and data races are eliminated by the type system (see Chapter 8, Concurrency and Parallelism). These primitives make it easy for programmers to leverage the power of many CPU cores that are available on current and future computing platforms
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    The rustc compiler is completely self hosted, which means that it is written in Rust and can compile itself by using a previous version. It uses the LLVM compiler framework as its backend (for more information on LLVM compiler framework, go to http://en.wikipedia.org/wiki/LLVM) and produces natively executable code that runs blazingly fast because it compiles to the same low-level code as C++ (To see an example of its speed, go to http://benchmarksgame.alioth.debian.org/u64q/rust.php.).
  • Евгений Корнюшенкоhar citeretfor 2 år siden
    Rust is especially suited when code quality is important, that is for:

    Modestly-sized or larger developer teams
    Code for long-running production use
    Code with a longer lifetime that requires regular maintenance and refactoring
    Code for which you would normally write a lot of unit tests to safeguard it
fb2epub
Træk og slip dine filer (ikke mere end 5 ad gangen)