iex> IO.inspect {1,2,3}
{1,2,3}
iex> IO.puts {1,2,3}
** (Protocol.UndefinedError) protocol String.Chars not implemented for {1,2,3}
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/14e06acf-cedc-4a50-8cb7-8fcbf6bcf411%40googlegroups.com.
String.Chars is only implemented for something that has straight-forward string conversion. Examples of this are strings (of course), charlists, integers, atoms and so on. The Inspect protocol on the other hand should be implemented for all data types (among them tuples) and also converts a term to a string.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/ad5248f1-a8b2-4813-8880-e00e46a94619%40googlegroups.com.