At 12:59 PM 23/04/2001 -0700, Nathan Wiger wrote:
>Larry Wall wrote:
> > The . is just syntax.  Do you mean something semantic by ".-based"?
>
>No, but I think "just syntax" is a little misleading. I do agree that we
>"well, Perl 5 did it this way" is not a sufficient design decision at
>this point. However, if you changed Perl's syntax too radically you
>would almost certainly lose programmers. You drop the $'s, change -> to
>., do this/that/etc and pretty soon it looks like Java, which people
>like myself really dislike. One of the reasons I program in Perl as my
>primary language is *because of* the syntax.

Totally agreed. I also program in Perl as my primary language because of 
the syntax.



> > Doesn't ~ look like a piece of string to you?  :-)
>It looks like a bitwise op to me, personally.

I wouldn't fix what is working well.



> > Then how do you concatenate a number?
>
>Here's something I was thinking about at lunch:
>
>    $concated_number = "$number" + "$other_number";
>    $numerical_add   = $number + $other_number;

Sorry, but this is Java. No thanks!!! (Tell me what "This is: " + $x + 1; 
IMO, if $x is 1, this could be both "This is: 2" or "This is: 11"; there's 
no way to DWIM when I'm not sure of WIM).



>    Perl 5                    Perl 6
>    ------------------------- ------------------------
>    "This" . "that"           "This" + "that"
>    $this . "that"            $this + "that"
>    $maybe_a_num . $that      "$maybe_a_num" + $that
>    $i++                      $i++
>    $i + 1                    $i + 1

The big need of ".", or concat, is when one of the arguments is a sub or 
method call. How would it be done?



>    die "Nope" unless ($i == "0");   # str eq
>    die "Nope" unless ("$i" == 0);   # same
>    die "Nope" unless ($i == 0);     # num ==

This is tcl or bash? No thanks!!! Enough of having $var and "$var" 
expanding different (try it in bash when there is an asterisk in the value 
of the variable... sometimes, backticks can get really nasty!)



> > There are many people who would prefer . to ->, if for no other reason
> > than it's cleaner looking and is one less character to type.

There are many people who prefer -> to .



> > The fact
> > that it's become the industry standard for method call syntax is also
> > a point in its favor.

C and C++ don't use "." as a standard for method call syntax. Also, I think 
Perl shouldn't be designed based on "industry standard" (Java is and Java 
sucks).



>Plus, you're now requiring all the Perl hackers to relearn two major
>tenets of Perl: "->" and ".".

Agreed. Perl hackers should be the primary target audience of Perl 6.




>No, but if Perl looks 95% like Java or C#, my prediction would be it
>will lose. If you throw out everything from the tens of previous years
>of Perl, then you cause a whole bunch of JAPH's to relearn lots. And
>then, these people might be prompted to say "Hey, if I have to relearn
>all this, let me check out some alternatives." At which point you lose
>people to Java or C# or other similar languages.

Well, that's silly. One doesn't look for alternatives because they're 
similar, but rather because they're completely different. The argument that 
Perl syntax should not change because it would look like other languages 
and drive Perl programmers to other languages is silly. Perl syntax should 
not change because it is pretty good the way it is!




>This is something to watch out for, not something that should decide
>Perl 6's design for paranoia's sake. I know that I am not the only one
>that loves Perl first and foremost for its syntax.

I am another one that loves Perl first and foremost for its syntax.

>Change too much and
>you're bound to drive some people away. Especially if these changes are
>inconsistent with other languages.

IMO, consistence with other languages doesn't matter.


>My conclusion: I say we do ". and +" or neither.

My conclusion: Let's not fix what is not broken.

- Branden

Reply via email to