+1
> On Jul 30, 2019, at 20:40, eksperimental wrote:
>
> `Function.identity/1`: I think you just hit the nail on the head with this
> one.
>
> Nice middle ground
> I'm +1 for this one.
>
> On Tue, 30 Jul 2019 12:46:53 -0400
> Allen Madsen wrote:
>
>> I don't have a strong opinion on this fu
`Function.identity/1`: I think you just hit the nail on the head with this one.
Nice middle ground
I'm +1 for this one.
On Tue, 30 Jul 2019 12:46:53 -0400
Allen Madsen wrote:
> I don't have a strong opinion on this function's inclusion. It's not
> mandatory that it live in Kernel though. It cou
Yes, we had debates about it and it is not the only time Dialyzer would
complain. I believe simply pattern matching on %MapSet{} would generate
warnings too. The one who has to change here is dialyzer (or Elixir's
interface to dialyzer should provide reasonable alternatives for this -
although I ha
Due to the opaqueness of `MapSet.t/*` such a macro isn't possible to
implement without dialyzer complaining on its usage.
José Valim schrieb am Di., 30. Juli 2019,
19:55:
> Or to be more precise, we will add is_struct/2, which is a more general
> feature than the one asked here. There is already
+1 from me.
-bt
On Tue, Jul 30, 2019 at 12:50 PM Ben Wilson wrote:
> I think having Enum.filter(list, &Function.identity/1) actually reads
> pretty well. It avoids the issue with putting it in Kernel, and provides a
> very explicit name which speaks to Bruce's goal of naming concepts.
>
> On Tu
Or to be more precise, we will add is_struct/2, which is a more general
feature than the one asked here. There is already an issue tracking this.
Thanks for the proposal!
--
*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D
--
You received this message because y
All of the “is_” macros can be used in guards and until Erlang/OTP 21 it
was not possible to implement said functionality in a way that is guards
compatible. We will drop support for OTP 20 once 1.10 is out (in January)
so the proposed feature will exist in Elixir v1.11.
--
*José Valim*
www.plat
Hi,
today I needed to assert in a test that something was a mapset. I looked
for a is_mapset/1 but I couldnt find one. So I created this one for my test:
def is_mapset(%MapSet{}), do: true
def is_mapset(_), do: false
I was kinda surpised that there is no such function because there are
similar
I think having Enum.filter(list, &Function.identity/1) actually reads
pretty well. It avoids the issue with putting it in Kernel, and provides a
very explicit name which speaks to Bruce's goal of naming concepts.
On Tuesday, July 30, 2019 at 12:47:08 PM UTC-4, Allen Madsen wrote:
>
> I don't hav
I don't have a strong opinion on this function's inclusion. It's not
mandatory that it live in Kernel though. It could exist on Function.
Allen Madsen
http://www.allenmadsen.com
On Tue, Jul 30, 2019 at 12:29 PM Chris McCord wrote:
> I’m just catching up on this thread now, but I’m in the “not
I’m just catching up on this thread now, but I’m in the “not valuable enough to
be added” camp. I’ve personally never needed such an abstraction – on my own or
while teaching. Also, an anon function serves the purpose when needed without
introducing a new concept. From the beginner perspective,
11 matches
Mail list logo