DEV Community

Discussion on: Pass-By-Value in C++ and Rust

Collapse
 
dervish_candela profile image
d.Candela

C++ gets a lot of bad rap. Some is well deserved. But "novice programmers mistaking values for references", is simply not a thing.

Value semantics is fundamental to all things math or computing.
An algebraic expression? 1 + 2 = 3, all these things are values.
No amount of Rust evangelism will ever change that.

C, and lots of early languages, were made with this in mind.
May I suggest a good article by (the) Andrzej Krzemienski detailing on this topic further

ttps://akrzemi1.wordpress.com/2012/02/03/value-semantics/
(it's from 2012, but absolutely relevant)