This change sounds great, I am very much in favor of it. On Fri, Sep 23, 2016 at 10:43 AM, Parker Selbert <par...@sorentwo.com> wrote:
> Ever since getting involved in Elixir I have been relieved that there > isn't any debate between ' and ", or remembering which supports > interpolation. Learning the distinction between binaries and charlists is > important when it comes to interfacing with Erlang modules, but that is > something you do after you've learned the basic syntax of Elixir. > > Writing ~c"mycharlist" is precisely as verbose as <<mybinary>> would be in > Erlang, but much less common in day to day elixir. > > I'm fully in favor of the change! > > — Parker > > > On Fri, Sep 23, 2016, at 10:28 AM, Onorio Catenacci wrote: > > This is a great point José i. e. reading code vs. writing code. > > When I'm writing code I never expect ' to behave the same as ". I guess > it's just years of software development that have conditioned me to be > surprised if they're interchangeable in a language. > > But when reading code it can be easy to conflate one with the other > because there's not a lot of psychological distance between ' and " (and > heaven help us with languages that use ` as well). So I think from the > standpoint of making the code less error-prone under maintenance there's a > good argument to be made for forcing people to use ~c. It will make the > distinction more obvious for those reading the code later on. Things like > this and slashed zeros in programming fonts are small things but they can > make a lot of difference to maintenance developers. > > oc > > > On Thursday, September 22, 2016 at 3:13:12 PM UTC-4, José Valim wrote: > > Single quotes will become a syntax error in Elixir 2.0. > > We need to consider two scenarios here: reading code and writing code. > > I believe that when someone reads ~c"" for the first time compared to '', > the sigil version will be more foreign, while the single quotes is more > likely to be assumed to be *something*. I am not sure one experience is > necessarily better than the other. > > However, when it comes to writing, I believe the ~c"" version will be less > confusing. There is very little chance someone will write ~c"" meaning a > string by mistake. Specially if single quotes raise a syntax error in the > future. And they are both learnable syntaxes, you need to learn what they > mean. > > For those who are skeptical because they use single quotes extensively, I > have one suggestion: try a change in your project where you replace single > quotes by the sigil, give it a week and let us know how it goes. I have > done it in a couple of my projects already and I was pleased with the > results. > > Thanks everyone for the feedback so far! > > > -- > > > > *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/c13d91bb-dbd7-44de-a7b3- > 94479648906c%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/c13d91bb-dbd7-44de-a7b3-94479648906c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- > 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/1474645407.795782.735004081.047484B9%40webmail. > messagingengine.com > <https://groups.google.com/d/msgid/elixir-lang-core/1474645407.795782.735004081.047484B9%40webmail.messagingengine.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAN3B1jcki68FrM4ghc4Fb5%2B6kHyhHNtvBU-hDETcPSao3d_kQw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.