lud
Change defaults printing of lists to ASCII chars
Today I saw another topic about “why does elixir prints my list as 'kjqzd' ?”
Printing lists as chars make sense in Erlang where this is the default string type, but in Elixir I guess it is useless, and confusing for all people that did never program with Erlang before.
What was the motivation to keep this behaviour in Elixir? What do you think about making charlists: :as_lists the default wherever it is configurable?
Most Liked
hauleth
al2o3cr
TBH it’s a tricky thing - the current default gets a fair few confused novices, but I can imagine getting just as many “I typed 'abc' in iex and it printed out [97, 98, 99] wtf” posts if it was the opposite…
lud
Hmmm that is a very good point :D;
In that case maybe I can just redefine the Inspect.Options module in my .iex files
Last Post!
LostKobrakai
This, but not only for manually created charlists, but any erlang function returning charlists.
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









