Re: [elixir-core:6784] defstruct

2016-12-27 Thread Louis Pop
I use a lot of structs, so I'd like this shorthand. I don't think wrapping the current syntax in a module is a problem though. You couldn't really implement this as a macro and save any typing as you'd need to require the macro before using it, which would probably be about the same amount of

Re: [elixir-core:6740] Application.get_env/2 support for {:system, "VARIABLE"}

2016-12-18 Thread Louis Pop
Why not just use `Application.get_env(app_name, var_name) || System.get_env(var_name)` in your init callback? Seems much clearer to me and requires no additions to get_env. On Sat, 17 Dec 2016 at 09:17 José Valim wrote: > There has been a couple discussions on

Re: [elixir-core:6714] [Proposal] Implement String.Chars for Exceptions

2016-12-07 Thread Louis Pop
What's the reason for not using inspect? On Wed, 7 Dec 2016, 02:59 Allen Madsen, wrote: > Hi all, > > I was trying to log an exception and noticed that this does not work: > Logger.error(exception). Logger could handle this case itself, but I > think it would be better to

Re: [elixir-core:6635] Adding __APP__ or something similar

2016-11-30 Thread Louis Pop
How would a module know what __APP__ is? What would the rules be? Cheers, Louis On Wed, 30 Nov 2016, 17:11 Allen Madsen, wrote: > What happens when you have your app and a dependency that both use __APP__? > > Allen Madsen > > > On Wed, Nov 30, 2016 at 11:40 AM, Dave

Re: [elixir-core:6597] Proposal: Enum.reject for Enum.compact

2016-11-17 Thread Louis Pop
Hiya I'd like an identity function in Kernel, that's for sure. I think an identity function being the default argument to filter would be quite nice. I find reject a bit strange, I don't set why it exists when we have filter. Cheers, Louis On Thu, 17 Nov 2016, 17:40 Tallak Tveide,

Re: [elixir-core:6491] Compiler warning for macros that do not return quoted expressions

2016-10-22 Thread Louis Pop
Hey João It's perfectly valid to construct Elixir AST without using `quote`, so adding a warning here would result in the compiler warning when nothing is wrong. Cheers, Louis On Sat, 22 Oct 2016 at 13:22 João Bernardo wrote: > Hi ! > > I am quite new to elixir, and I am

Re: [elixir-core:6489] Re: [Proposal] Adopt a few of the good decisions made in other repls

2016-10-21 Thread Louis Pop
, atom: :blue] and so on? *José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R On Thu, Oct 20, 2016 at 5:50 PM, Louis Pop <louispopin...@gmail.com> wrote: Hey gang! On Saturday we're having a little Elixir build day at work and I thought this could be a fun thin

Re: [elixir-core:5994] Re: Access behaviour for lists and tuples?

2016-06-27 Thread Louis Pop
Hey I think adding the Access protocol to lists would imply that list indexing is efficient. We should be careful to steer new users away from techniques that are inefficient or not idiomatic. Cheers, Louis On 27 June 2016 at 16:22, Filip Haglund wrote: > Would it hurt

Re: [elixir-core:5948] Proposal: Stop appending a trailing dot when autocompleting modules in IEx

2016-06-23 Thread Louis Pop
I share Jose' opinion here, but making it configurable sounds good. Cheers, Louis On 23 June 2016 at 17:40, Myron Marston wrote: > This behavior of IEx has always surprised and annoyed me. I regularly type h > [first few chars of mod name] in IEx to read the read the >