RUST - A Programming Language

                Started by Graydon Hoare in 2006 and later joined by Mozilla in 2009 RUST is an revolutionary programming language which in the upcoming days would be called a great accomplishment of Mozilla Research. It supports more than one programming paradigm which consist of procedural, concurrent, metaprogramming and object oriented providing a pathway for programmers to work in different styles thus creating an efficient development way and is a compiler implementable programming language which indicates that interpreters cannot be used for the translation of source code since interpreters lack the ability of pre-run-time translation. Procedural programming is nothing but imperative where program consists of one or more procedures (subroutines). The compiler "rustc" is written in rust itself and the source build requires an internet connection for the snapshots to be downloaded and and os for execution. The source extension is .rs .The way to add comments in program is same as in c. The compiler tries to provide sufficient information whenever the error occurs. The snapshot binaries are currently built and tested on windows(7, Server 2008 R2) x86 only, linux x86 & x86-64 and OSX 10.6(snow leopard) and many more whose details can be found out in http://www.rust-lang.org .

   
The development of Rust is basically focused  on control of memory layout , concurrency and safety and not much attention on its performance. Its memory safety feature makes sure that there is no buffer overflow and it doesn't permit null or dangling pointers. The syntax being similar to that of c/c++ where the block of code is delimited(enclosed) by curly braces , it is semantically(logically) said to be different. Its concurrency feature take the advantage of its concurrent programming paradigm where lightweight task communicate via messages rather than shared memory communication where the communication takes place by altering the contents of shared memory locations, but the communication via messages which can be carried out asynchronously or other way where sender blocks until the message is received makes concurrent programming more robust since the memory overhead and task switching overhead per process is low. 

Data initialization follows fixed format and there are extra keywords added for secure programming . For example 'let' keyword is used for introducing a local variable and 'let mut' for a local variable that is to be reassigned in the later part of the program. It has a feature allowing it to infer the type of local variable and even allows the user to declare in a format where the variable name following a colon and then the type name. But the static items require the type declaration.

Most importantly the feature that has made it outshine is its memory handling(memory management) which provides the programmer the complete control over the memory and lets him decide about the allocation and deallocation. The allocation returns a smart pointer but deallocation is automatic which takes place as soon as it goes out of scope and hence the name smart pointer since it keeps an eye and effectively deallocates. The Smart pointers can be further classified into unique smart pointers and managed smart pointers, where the unique smart pointer (uses ~ symbol(the symbol ~ is called tilde)) are the smart pointers which uniquely point to the allocation( only one for each allocation) but managed smart pointers(uses @ symbol) employ multiple pointers pointing to the same allocation.

Thus the Rust is a different kind of programming language that many would be interested to develop and work with. For tutorials to get hands on this beautiful programming language can be found in the website http://static.rust-lang.org/doc/tutorial.html

For the reference manual visit:
http://static.rust-lang.org/doc/rust.html

Comments