Rust 0.4 Full Integration of Borrowed Pointers
Rust 0.4 Full Integration of Borrowed Pointers
Written by Kay Ewbank   
Tuesday, 06 November 2012

A new version of Mozilla’s programming language Rust has been released with the aim of stabilizing the language syntax.

The new version removes argument modes and has full integration of borrowed pointers. Rust is a curly-brace, block-structured expression language that looks similar to C and C++.

It has different syntax to C and has been designed with the aim of giving developers ways to write code that behaves well in large and concurrent systems. The original design of Rust was by developer Graydon Hoare, though later work has been carried out by Mozilla.


 (click to enlarge)


One main change to the new version is the full integration of borrowed pointers, alongside the removal of argument modes. Until this version, you could rely on type-directed heuristics to select a default argument passing behavior, but developers reported that this was confusing, so the facility has been removed.

The recommendation that borrowed pointers are now fully mature and should be used, highlights one of Rust’s more unusual features. It has three types of pointers:

borrowed, unique and managed.

Managed pointers make it easy to carry out garbage collection; unique pointers let you avoid the need to use garbage collection; and borrowed pointers allow functions to work with both unique and managed pointers.

The strength of a borrowed pointer is that it can be used to point anywhere: into the shared and exchange heaps, into the stack, and even into the interior of another data structure.

There’s a good tutorial on borrowed pointers by Mozilla's Rust developer, Niko Matsakis on his Baby Steps blog.

Someone recently quipped that if you can hang yourself with one pointer then three distinct types should do the job in far less time - but I'm sure this isn't true.

Other changes to Rust include the replacement of classes with structs, better error reporting, and a reduction in the list of reserved keywords.




More Information

Rust Language

Download - tarball

Download - Window installer

Detailed Release Notes


Related Articles

The Functional View of the New Languages

Ceylon Achieves Milestone 1

Ready to Go - Go Reaches Version 1

Kotlin Goes Open Source




or email your comment to:


To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.



HHVM 3.25 Defaults To PHP7

Developers from Facebook have released a new version of HHVM, the Hip Hop Virtual Machine. The PHP support in new release has been changed to default to PHP 7 rather than the PHP 5 of the previous ver [ ... ]

An Update on Language Popularity - Perl is in Trouble

According to April's TIOBE Index, Python has dislodged C#, and Objective C and Perl are both in decline. SQL appears to be making a rapid rise - but that's an anomaly.

More News

Last Updated ( Wednesday, 07 November 2012 )

RSS feed of news items only
I Programmer News
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.