John Porter wrote:
>
> > One of the reasons I program in Perl as my
> > primary language is *because of* the syntax.
>
> With all due respect, I don't believe that's why you,
> or anyone else, likes to program in Perl.
I *really* don't want this to turn into a religious argument, which it's
fast becoming. I will tell you that my statement above is completely
truthful, coming from a sh/C background. If you don't believe me, well,
I don't know what to say.
Here is all I'm saying:
The argument for changing -> to . is because it gains us compatibility
with other languages that are HLL, like Java, Python, C#, C++, etc, etc.
THIS IS GOOD. I agree.
However, if we are to do this, then I say we "go the whole 9 nine yards"
and figure out how to make + do correct string concat. That is, make
sure we maintain the auto-conversion from strings <-> numbers. Here,
we're be one-upping Java and other clones. We already (via overloading)
have "$var" != $var, so let's look into using this.
Now, please don't quasi-flame me and claim that I'm saying we can't have
"~" mean string concat because it's odd. But, if we're trying to get
closer to other languages with -> vs ., then adding "~" works against
that goal. This is made worse by the fact that *everyone* - Perl hackers
and Java programmers alike - will perceive this as different from all
other languages. It runs directly counter to the original goal: Making
Perl syntax more consistent with other languages.
Anyways, I'm really not on either side of the fence - please don't
misunderstand me. All I'm saying is that we should figure out the goal
and try to achieve that. Think of how cool it could be if we could
*extend* the Java . and + operators with better DWIMmery!
-Nate