> I find the __ *really* hard to follow. I've been trying to keep up with
> this discussion, but it's really chewing me up.
>
> Since this is really something different (not a scalar, hash, etc), has
> any consideration been given to other variable names:
>
> ^_
> &_ # kinda like this - higher-order "&func"
> !_
>
I've already suggested an extension to the RFC that I think makes it more
powerful and makes the notation follow directly. Do you mind if I repeat
it?:
----
It is proposed that Perl introduce a new prefix '_', which indicates a
placeholder. This can be used either as '_identifier', which creates a named
placeholder, or '__', which creates an anonymous placeholder.
----
New programmers should easily understand that:
- $foo is the variable 'foo'
- _foo is the placeholder 'foo'
- $_ is the default variable
- __ is the default placeholder.
Then, when they see the same named placeholder appear twice in the same
higher-order function, they know that each is referring to the same thing.
Your suggested changes to notation don't allow for named placeholders.
Besides, '__' is clearly a blank spot, and therefore a place waiting to be
filled in (a placeholder, in fact!).