Implicit member expression

Has anyone been working with swift programming language? It has a cool feature called implicit member expression which could be very useful in some cases (of course there is more than this, but this feature may come in handy). Edit: This feature infers a type based on context but since JavaScript is not strongly typed I can imagine using it the following way:

For example consider a simple array filter function:

array.filter(item => item.field)

You need to pick an item name which is used only in the context of filtering and sometimes it's pretty annoying. With the implicit member expression you could write


It can also help prevent conflicting names => => => i.baz)))

with this clean solution

Unless Iā€™m missing something obvious, implicit member expression does something different from what you are describing.

Probably, it's just where idea came from. I am not a swift expert and I should mention it in the post.