Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Iterators and Ranges - Comparing C++ to D to Rust

CppNow via YouTube

Overview

Explore the differences between iterator and range models in C++, D, and Rust in this comprehensive conference talk from CppNow 2021. Delve into the STL iterator abstraction in C++ and compare it to alternative approaches in D and Rust. Examine the strengths and weaknesses of each language's model through implementations of common operations like map, filter, and find_if. Gain insights into the nuances of iterator-pair models versus other iteration paradigms used in languages such as Python and Java. Learn from detailed code examples and analysis of how these different approaches impact language design and usage.

Syllabus

Intro
Basis Operations
Basic C++ Range Structure
Implementing map in C++ (transform)
Implementing filter in C++
The D Ranges Model
Basic D Range Structure
Implementing map in D
Implementing filter in D
Reading Languages
C++ Iterators vs D Ranges: find if
C++ Iterators vs D Ranges: splitting
The Rust Iterator Model
Basic Rust Iterator Structure
Implementing map in Rust
Implementing filter in Rust
The Rust/Python Iterator Model
Implementing filter in Python
Implementing filter in Java
Implementing peek in Rust
Iterator Languages: find if
Iterator Languages: group_by

Taught by

CppNow

Reviews

Start your review of Iterators and Ranges - Comparing C++ to D to Rust

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.