Skip to content

Gab-2000/C12_C_Cpp_Rust_Systems_Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ C12 – C, C++, and Rust: A Comparative Study

Advanced Programming Course Project | Systems programming models, safety, and performance.


πŸ“Œ Overview

This repository accompanies the C12 project for the Advanced Programming course. The project presents a comprehensive comparative study of C, C++, and Rust.


πŸ›  Project Structure

πŸ“– Part 1: Theoretical Analysis

A structured comparison documented in the report covering memory models, type systems, and safety guarantees.

πŸ’» Part 2: Practical Code Examples

Minimal examples demonstrating how the same low-level problems are handled across languages.

code/
β”œβ”€β”€ 🟦 c/          # Manual allocation (malloc/free), pointers, return codes
β”œβ”€β”€ πŸŸͺ cpp/        # RAII, templates, smart pointers, exceptions
└── πŸ¦€ rust/       # Ownership, borrowing, lifetimes, Result/Option

πŸ” Language Comparison Summary

Feature C C++ Rust
Abstraction Minimal (Macros/Structs) High (Classes/Templates) Strict (Traits/Generics)
Error Handling Return Codes Exceptions (Try/Catch) Algebraic (Result/Option)
Pointers Raw Pointers (Unsafe) Smart Pointers (Safer) References (Borrowing)
Memory Manual (malloc/free) RAII (Destructors) Ownership & Lifetimes

πŸ“„ Documentation

The full technical report, including detailed analysis and discussion of design trade-offs, is available here:

πŸ‘‰ Download Project Report (PDF)


Developed as part of the Advanced Programming curriculum.

πŸ“‚ Implementation Details

The practical examples highlight key language-level trade-offs:

  • Abstractions: How macros compare to templates and traits in systems programming.
  • Error Handling: Traditional return codes vs. exception handling vs. robust type-safe Results.
  • Memory Management: Manual allocation (C) vs. automatic cleanup via RAII (C++) vs. compile-time ownership (Rust).
  • Pointer Usage: Raw pointer arithmetic vs. safer smart pointers vs. strict borrowing rules.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors