Evaluation of Rust code verbosity, understandability and complexity.

PeerJ Comput Sci

Department of Control and Computer Engineering, Polytechnic Institute of Turin, Torino, Piemonte, Italia.

Published: February 2021

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 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.

Download full-text PDF

Source
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC7959618PMC
http://dx.doi.org/10.7717/peerj-cs.406DOI Listing

Publication Analysis

Top Keywords

rust code
16
verbosity understandability
8
rust
8
complexity maintainability
8
object-oriented languages
8
language
6
languages
6
code
5
complexity
5
evaluation rust
4

Similar Publications

Gretl-variation GRaph Evaluation TooLkit.

Bioinformatics

December 2024

Department of Molecular Biology, Max Planck Institute for Biology Tübingen, 72076 Tübingen, Germany.

Motivation: As genome graphs are powerful data structures for representing the genetic diversity within populations, they can help identify genomic variations that traditional linear references miss, but their complexity and size makes the analysis of genome graphs challenging. We sought to develop a genome graph analysis tool that helps these analyses to become more accessible by addressing the limitations of existing tools. Specifically, we improve scalability and user-friendliness, and we provide many new statistics tailored to variation graphs for graph evaluation, including sample-specific features.

View Article and Find Full Text PDF

A quantitative multi-parameter mapping protocol standardized for clinical research in multiple sclerosis.

Sci Rep

December 2024

Experimental and Clinical Research Center, a Cooperation Between Max Delbrück Center for Molecular Medicine in the Helmholtz Association, Charité - Universitätsmedizin Berlin, Geschäftsführung, Charitéplatz 1, 10117, Berlin, Germany.

Quantitative magnetic resonance imaging (qMRI) involves mapping microstructure in standardized units sensitive to histological properties and supplements conventional MRI, which relies on contrast weighted images where intensities have no biophysical meaning. While measuring tissue properties such as myelin, iron or water content is desired in a disease context, qMRI changes may typically reflect mixed influences from aging or pre-clinical degeneration. We used a fast multi-parameter mapping (MPM) protocol for clinical routine at 3T to reconstruct whole-brain quantitative maps of magnetization transfer saturation (MT), proton density (PD), longitudinal (R1), and transverse relaxation rate (R2*) with 1.

View Article and Find Full Text PDF
Article Synopsis
  • - Using only one linear reference genome limits the understanding of genomic diversity; the draft human pangenome shows the need for pangenomics to address these gaps and capture more genetic variation.
  • - A new tool called Panacus (pangenome-abacus) has been developed to efficiently analyze pangenomes, capable of processing large human pangenome graphs quickly, producing interactive visualizations in under an hour.
  • - Panacus is open-source and built in Rust, available for installation through Bioconda, with its source code and documentation accessible on GitHub.
View Article and Find Full Text PDF

Tumor characteristics in immunosuppressed and renal dysfunction populations.

Urol Oncol

December 2024

Department of Urology, Columbia University Vagelos College of Physicians and Surgeons, New York, NY; Herbert Irving Comprehensive Cancer Center, Columbia University Irving Medical Center, New York, NY. Electronic address:

Purpose: Renal transplantation and end-stage renal disease are increasingly common. Renal dysfunction and immunosuppression are two risk factors in the development of renal cell carcinoma. Carcinomas in these patients are thought to be more indolent, however data are limited and mixed.

View Article and Find Full Text PDF
Article Synopsis
  • A new toolkit has been created to facilitate whole genome alignment, processing, and analysis as long-read sequencing technologies advance, making individual complete genomes more accessible.
  • This toolkit supports various formats and offers features like alignment-based variant calling and visualization, enabling effective population-level genome analysis.
  • Developed in Rust for efficiency and safety, the software is free and open-source, available on GitHub, and capable of handling large datasets of numerous genomes.
View Article and Find Full Text PDF

Want AI Summaries of new PubMed Abstracts delivered to your In-box?

Enter search terms and have AI summaries delivered each week - change queries or unsubscribe any time!