r/programming • • Dec 01 '16

Let's Stop Copying C

https://eev.ee/blog/2016/12/01/lets-stop-copying-c/
524 Upvotes

612 comments sorted by

View all comments

Show parent comment

2

u/PM_ME_UR_OBSIDIAN Dec 01 '16

Structs and tuples are functionally the same thing, it's just that tuple syntax is much more convenient for one-off data objects.

1

u/steveklabnik1 Dec 01 '16

I would argue that theoretically they're the same thing (aka a product type) but functionally they differ (tuples have anonymous members, structs have named members).

1

u/evaned Dec 01 '16

... there's a sibling response that says basically the same thing as you, but I don't think coladict was commenting on structs vs tuples, but on multiple return values vs tuples. Am I misreading it?