0.4.0

0.4.0 #

  • Released on: 15 October, 2012
  • Branched from master on: 4 December, 2015
  • ~2000 changes, numerous bugfixes

    • Syntax

      • All keywords are now strict and may not be used as identifiers anywhere
      • Keyword removal: ‘again’, ‘import’, ‘check’, ’new’, ‘owned’, ‘send’, ‘of’, ‘with’, ’to’, ‘class’.
      • Classes are replaced with simpler structs
      • Explicit method self types
      • ret became return and alt became match
      • import is now use; use is now extern mod`
      • extern mod { ... } is now extern { ... }
      • use mod is the recommended way to import modules
      • pub and priv replace deprecated export lists
      • The syntax of match pattern arms now uses fat arrow (=>)
      • main no longer accepts an args vector; use os::args instead
    • Semantics

      • Trait implementations are now coherent, ala Haskell typeclasses
      • Trait methods may be static
      • Argument modes are deprecated
      • Borrowed pointers are much more mature and recommended for use
      • Strings and vectors in the static region are stored in constant memory
      • Typestate was removed
      • Resolution rewritten to be more reliable
      • Support for ‘dual-mode’ data structures (freezing and thawing)
    • Libraries

      • Most binary operators can now be overloaded via the traits in `core::ops’
      • std::net::url for representing URLs
      • Sendable hash maps in core::send_map
      • `core::task’ gained a (currently unsafe) task-local storage API
    • Concurrency

      • An efficient new intertask communication primitive called the pipe, along with a number of higher-level channel types, in core::pipes
      • std::arc, an atomically reference counted, immutable, shared memory type
      • std::sync, various exotic synchronization tools based on arcs and pipes
      • Futures are now based on pipes and sendable
      • More robust linked task failure
      • Improved task builder API
    • Other

      • Improved error reporting
      • Preliminary JIT support
      • Preliminary work on precise GC
      • Extensive architectural improvements to rustc
      • Begun a transition away from buggy C++-based reflection (shape) code to Rust-based (visitor) code
      • All hash functions and tables converted to secure, randomized SipHash