Re: [elixir-core:8427] [Proposal] Deprecate unless-else

2019-01-03 Thread eksperimental
On Fri, 4 Jan 2019 07:54:44 +0700 eksperimental wrote: > On Thu, 3 Jan 2019 11:25:13 -0800 > Ryan Winchester wrote: > > Have the formatter change it to an if/else 😈, or just leave it for tools > > like Credo to yell at you for an unless/else. > > This is definitely something the formatter sho

Re: [elixir-core:8426] [Proposal] Deprecate unless-else

2019-01-03 Thread eksperimental
On Thu, 3 Jan 2019 11:25:13 -0800 Ryan Winchester wrote: > Have the formatter change it to an if/else 😈, or just leave it for tools > like Credo to yell at you for an unless/else. This is definitely something the formatter should do. Formatter shouldn't change the semantics at all, and the AST s

Re: [elixir-core:8425] [Proposal] Deprecate unless-else

2019-01-03 Thread Ryan Winchester
Have the formatter change it to an if/else 😈, or just leave it for tools like Credo to yell at you for an unless/else. On Thu, Jan 3, 2019, 10:56 AM Parker Selbert If anything this seems more suited to be a warning rather than something > deprecated and slated for removal. It would be similar to

Re: [elixir-core:8424] [Proposal] Deprecate unless-else

2019-01-03 Thread Parker Selbert
If anything this seems more suited to be a warning rather than something deprecated and slated for removal. It would be similar to how the compiler suggests pattern matching on an empty list instead of length(list). The difference being that there are performance differences for pattern matching

Re: [elixir-core:8423] [Proposal] Deprecate unless-else

2019-01-03 Thread Chris Keathley
Given that it's a breaking change this wouldn't happen till at least some future version of Elixir so its not really a real discussion. That said, generally speaking the amount of times you need to break an existing api are close to 0 and definitely shouldn't be driven by what the community believe

Re: [elixir-core:8422] [Proposal] Deprecate unless-else

2019-01-03 Thread Josh Adams
I really appreciate this suggestion. It would be a breaking change to the API, so that's a negative and implies that it couldn't actually happen until Elixir 2.0 I would assume. However, I can confirm that every single time I've seen an `unless/else` it has resulted in confusing logic and removing

[elixir-core:8422] [Proposal] Deprecate unless-else

2019-01-03 Thread Mikael Muszynski
I would like to propose the removal of the ability to use `Kernel.unless/2` with an `else`-clause. This proposal is inspired by the seeming consensus between the most prominent style guides for Elixir, along with similar consensus in the most often cited style guides for Ruby (where this abilit