Open davidanthoff opened 7 years ago
Would f..(x)
mean (i -> f.(i)).(x)
?
Yes. I'm realizing now that this issue here is essentially subsuming #20502.
Some languages use .a
as short for x -> x.a
, which is kind of nice. Could be compatible with this, but just something else to think about around dots.
Some languages use
.a
as short forx -> x.a
, which is kind of nice. Could be compatible with this, but just something else to think about around dots.
And I would very much like that as well :) My understanding of the parser is not good enough to be able to tell whether this could be compatible, I'm afraid...
This would be similar to the way
!
and∘
work right now.For example,
map(f., x)
would be equivalent tomap(i -> f.(i), x)
.This would make
map
work pretty seamlessly with the whole call-site lifting operator as it is implemented right now, i.e. ifx
is aArray{Nullable{T},N}
this would be a natural way to map the lifted version of a function over that array.