DEV Community

Discussion on: Discovering Go from C++ [Part 1] variables, conditions, loops, print.

Collapse
 
phundrak profile image
Phundrak

I’d just like to point out that, concerning the multiple value return, since C++17 you can now write auto [a, b, c] = set(); which declares a, b and c as local variables just like you did in your Go code. I personally find it a bit easier to read than using the returned tuple as is.

I’m looking forward the next part!

Collapse
 
pmalhaire profile image
pmalhaire

Thank you for your edit, I updated the code and the sample accordingly !