Hello everyone,

I have mentioned a couple times we would start a discussion for deprecating
'single quotes as char lists' from the language.

The use of single quotes to specify something that looks like a string but
isn't really a string is often a source confusion. This is specially
frustrating given the expectation brought from other languages where double
and single quoted strings can be used almost interchangeably.

We already have a quite decent way of writing char lists, which is by using
sigils: ~c"foo". For new developers, printing a char list as a ~c"foo" will
likely give them better clues the type is not the same as "foo".

Of course we should not drive decisions based purely on the getting started
experience but I believe the sigil approach will be clearer for beginner
and advanced programmers alike.

The plan is not to deprecate them now but rather in the long term.
Something like this:

1. Elixir v1.4 will inspect 'abc' as ~c"abc"
2. Elixir v1.6 will effectively deprecate 'abc'
3. Elixir v2.0 "who knows when" will remove single-quotes

Thoughts?

*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BX9q9SAZjj4otmbjXRBhJyvQk0r%3D8pERwtrFcAczGNPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to