elixir-lang / elixir-lang.github.com

Website for Elixir
elixir-lang.org
354 stars 822 forks source link

Explain why functions returns extra information with tuples, not with lists #1706

Closed Florent2 closed 1 year ago

Florent2 commented 1 year ago

Currently the guide says

One very common use case for tuples is to use them to return extra information from a function.

but I find it does not explicitly say why.

Hopefully this change makes it clearer. I'm an Elixir beginner, so the explanation may be wrong though :)

josevalim commented 1 year ago

Hi @Florent2, can you please send your PR here: https://github.com/elixir-lang/elixir/blob/main/lib/elixir/pages/getting-started/basic-types.md ?

We are moving the guides to the language repo as well and we are waiting for a new release so we can officially move them. :) Thank you!