Re: [elixir-core:7781] Proposal: Allow IO.inspect to accept a function as argument

2018-01-19 Thread Federico Bergero
I have a real-life example (not for debugging). I'm actually tee function (my own trivial implementation). Suppose you have to change some records on a Repo (using Ecto) and the send some notifications about those changes. We are doing something like this: changeset = E |> Repo.get(id)

Re: [elixir-core:7780] Proposal: Allow IO.inspect to accept a function as argument

2018-01-19 Thread marcus
`apply` is succinct and clear. I created a PR here: https://github.com/elixir-lang/elixir/pull/7229 It's been closed for now, until something (if anything) is agreed upon. Are there downsides of adding `apply` to IO.inspect/3 that outweigh the benefits? On Monday, January 15, 2018 at 1:14:54 P

[elixir-core:7779] Re: Why using "|" in a map is calling update instead of put ?

2018-01-19 Thread Ben Wilson
Notably, this mailing list is for proposals for the development of the language. General questions are better suited for the forums, slack, irc, or other more general discussion areas. On Wednesday, January 17, 2018 at 5:11:01 AM UTC-5, mG S wrote: > > Any exemple about "avoid bugs but to allow

Re: [elixir-core:7778] Proposal: Allow IO.inspect to accept a function as argument

2018-01-19 Thread Kelvin Raffael Stinghen
It happens that the `tee/2` function was not merged to elixir core because not too much people could bring real-life examples for using it except for debugging. But for those who liked the idea and want to use the `tee/2` function, I've created the [`plumbing`](https://github.com/kelvinst/plumb

[elixir-core:7777] Re: make functions with @doc false visible in IEX autocompletion

2018-01-19 Thread Kelvin Raffael Stinghen
> > Now that Elixir 1.6 has a *@deprecated* attribute, can we disable > autocomplete in IEx only for functions that have *@deprecated* associated > to function definitions? I agree with hiding *@deprecated *functions, but not the *@doc false* ones. On Thursday, January 4, 2018 at 1:22:02 PM U

[elixir-core:7776] Re: [Proposal] Protected/Private modules

2018-01-19 Thread Kelvin Raffael Stinghen
> I'm not in favour making decision in IEx base on *@moduledoc false* or *@doc false.* Me too. I think the point Myron's proposal got is much more interesting. Read the thread for details: https://groups.google.com/d/msg/elixir-lang-core/X18SZnSDW7U/LZm8_8PYBQAJ On Thursday, January 4, 2018 at

Re: [elixir-core:7775] Proposal: Float.to_integer

2018-01-19 Thread Kelvin Raffael Stinghen
Just to mention the Float docs improvement suggested is on master ❤️ 💚 💙 💛 💜 On Wednesday, January 3, 2018 at 10:34:31 AM UTC-2, José Valim wrote: > > > Yep, I’ve noticed that. Is this the argument to have them as Kernel > functions? Why not having a `Float.to_integer(float, :round | :trunc)` >