News for hackers. Stuff that matters.
Re:From Python to Go to Rust: an opinionated journey (2018) by weiming on Monday June 24, 2019 @04:12PM (#20267925)
You can accomplish iterations more concisely using other means, for example list operations in `Enum` [1]. Not too different from other modern languages often using `foreach` vs. i-based iteration.

Also, try `IO.puts inspect foo` for printing stuff.

`IO.puts` can be compared to print() behavior in other languages expecting toString() is fully implemented (`to_string` in this case for your custom typed data structs. [2][3])

[1] https://hexdocs.pm/elixir/Enum.html

[2] https://hexdocs.pm/elixir/String.Chars.html

[3] https://code.tutsplus.com/articles/polymorphism-with-protoco...

There are no comments on this comment yet.