scholarly journals Evaluation of Rust code verbosity, understandability and complexity

2021 ◽  
Vol 7 ◽  
pp. e406
Author(s):  
Luca Ardito ◽  
Luca Barbato ◽  
Riccardo Coppola ◽  
Michele Valsesia

Rust is an innovative programming language initially implemented by Mozilla, developed to ensure high performance, reliability, and productivity. The final purpose of this study consists of applying a set of common static software metrics to programs written in Rust to assess the verbosity, understandability, organization, complexity, and maintainability of the language. To that extent, nine different implementations of algorithms available in different languages were selected. We computed a set of metrics for Rust, comparing them with the ones obtained from C and a set of object-oriented languages: C++, Python, JavaScript, TypeScript. To parse the software artifacts and compute the metrics, it was leveraged a tool called rust-code-analysis that was extended with a software module, written in Python, with the aim of uniforming and comparing the results. The Rust code had an average verbosity in terms of the raw size of the code. It exposed the most structured source organization in terms of the number of methods. Rust code had a better Cyclomatic Complexity, Halstead Metrics, and Maintainability Indexes than C and C++ but performed worse than the other considered object-oriented languages. Lastly, the Rust code exhibited the lowest COGNITIVE complexity of all languages. The collected measures prove that the Rust language has average complexity and maintainability compared to a set of popular languages. It is more easily maintainable and less complex than the C and C++ languages, which can be considered syntactically similar. These results, paired with the memory safety and safe concurrency characteristics of the language, can encourage wider adoption of the language of Rust in substitution of the C language in both the open-source and industrial environments.

Author(s):  
Kecia A. M. Ferreira ◽  
Mariza A. S. Bigonha ◽  
Roberto S. Bigonha ◽  
Heitor C. Almeida ◽  
Luiz F. O. Mendes

2009 ◽  
Vol 22 (5) ◽  
pp. 489-535 ◽  
Author(s):  
Adolfo Duran ◽  
Ana Cavalcanti ◽  
Augusto Sampaio

2010 ◽  
Vol 36 (2) ◽  
pp. 123-141 ◽  
Author(s):  
Daniel Fernández Lanvin ◽  
Raúl Izquierdo Castanedo ◽  
Aquilino Adolfo Juan Fuente ◽  
Alberto Manuel Fernández Álvarez

Author(s):  
Gary A. Gabriele ◽  
Agustî Maria I. Serrano

Abstract The need for superior design tools has lead to the development of better and more complex computer aided design programs. Two of the more important new developments in application tools being investigation are Object Oriented Languages, and HyperMedia. Object Oriented Languages allow the development of CAD tools where the parts being designed and the design procedures specified are conceptualized as objects. This allows for the development of design aids that are non-procedural and more readily manipulated by the user trying to accomplish a design task. HyperMedia allows for the easy inclusion of many different types of data, such as design charts and graphs, into the tool that are normally difficult to include in design tools programmed with more conventional programming languages. This paper explores the development of a computer aided design tool for the design of a single stage gear box using the development HyperCard® environment and the HyperTalk® programming language. The resulting program provides a user friendly interface, the ability to handle several kinds of design information including graphic and textual, and a non-procedural design tool to help the user design simple, one stage gear boxes. Help facilities in the program make it suitable for undergraduate instruction in a machine elements design course.


2012 ◽  
Vol 6 ◽  
pp. 420-427 ◽  
Author(s):  
Yeresime Suresh ◽  
Jayadeep Pati ◽  
Santanu Ku Rath

Sign in / Sign up

Export Citation Format

Share Document