Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-26 Thread chromatic
On Thu, 2005-10-20 at 17:12 -0700, Nate Wiger wrote:

 If Perl 6 is going to be successful, this means it must change the
 fewest key things with the most benefits.

I think there's an assumption here that not only do I not hold but I do
not even understand.

Suppose that I am a game developer with a small, very devoted and vocal
group of fans.  I interact with them regularly through IRC, message
boards, and occasionally even private e-mail.

I decide to create a new game and start to do some market research.
Obviously I ask my core group of fans what they want.  They oblige: more
of everything they loved from previous games, harder difficulties, more
in-jokes, and all of the new features they've always wanted in my
previous games.

I listen to them and write the game that my core fans want and, if I'm
really surprisingly amazingly lucky, other people want it too and it's a
success.

More likely, it sells a few copies outside of my fanbase and I learn a
painful lesson:  there are more people you are not currently reaching
than you are currently reaching.

It's worth keeping them in mind.

-- c



Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Benjamin Smith
On Thu, Oct 20, 2005 at 06:39:34PM -0600, Luke Palmer wrote:
 On 10/20/05, Nate Wiger [EMAIL PROTECTED] wrote:
  Luke Palmer wrote:
   The fact that we use . instead of - (like every other language on
   the planet)?
 
  You're using my argument for me - thanks. See above.
 
 Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
 Perl 6 from some non-Perl 5 language is going to be more comfortable
 with dot.

Unless it was Smalltalk, C++, Haskell etc.

I really wish people wouldn't use the argument that . is used for method
calls everywhere.  It's not.

Surely we have a much better argument in what we used - for instead?

   [1] Which will be, what, eight hours for a Perl 5 programmer?  Have
   you ever spent a month trying to learn, oh, say, Haskell?  Because
   people do that, too.
 
  There are more components to this that just the learning time for one
  person. There are project teams, sustaining engineering for existing
  projects, etc. And that's not even counting management tape. Real-world,
  profitable computing is a big, ugly, nasty beast.

Basically that would mean that any team would never be able to change
language, right?  So there would be no difference if we wanted them to
change to Perl 5, Perl 6 or Haskell, so it doesn't seem very useful to
argue about this.

-- 
Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED]


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Luke Palmer
On 10/21/05, Benjamin Smith [EMAIL PROTECTED] wrote:
 On Thu, Oct 20, 2005 at 06:39:34PM -0600, Luke Palmer wrote:
  Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
  Perl 6 from some non-Perl 5 language is going to be more comfortable
  with dot.

 Unless it was Smalltalk, C++, Haskell etc.

 I really wish people wouldn't use the argument that . is used for method
 calls everywhere.  It's not.

Well, you know, for this kind of argument I would generally agree with
you.  But I think in this case, I won't.  The reasoning is a little
shakey, but I think it still works.

Smalltalk uses whitespace, therefore making it *the* fundamental
syntactic operation (like function application in Haskell).  Since our
fundamental operation is not method call, it doesn't count.

C++ uses dot half the time.

Haskell doesn't really have methods.  They're just functions.  We
aren't taking that conceptual route, so Haskell doesn't count either.

Dot is probably the most semantically consistent character of modern
programming languages, second only to perhaps parentheses.

Luke


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Luke Palmer
On 10/21/05, Luke Palmer [EMAIL PROTECTED] wrote:
 On 10/21/05, Benjamin Smith [EMAIL PROTECTED] wrote:
  On Thu, Oct 20, 2005 at 06:39:34PM -0600, Luke Palmer wrote:
   Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
   Perl 6 from some non-Perl 5 language is going to be more comfortable
   with dot.
 
  Unless it was Smalltalk, C++, Haskell etc.
 
  I really wish people wouldn't use the argument that . is used for method
  calls everywhere.  It's not.

I guess I was saying that of the infix characters we had available to
choose, dot is the only one anybody uses.  All the others are dotless,
so our attempts would be pointless, period.

Luke


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Michele Dondi

On Thu, 20 Oct 2005, Luke Palmer wrote:


Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
Perl 6 from some non-Perl 5 language is going to be more comfortable
with dot.


(Also, I did like the arrow notation, but) how cool would be

@cool=grep -cool, @misc; # if compared to
@cool=grep .cool, @misc;  # ?


Michele
--
Jack Burton: This is Jack Burton in the Pork Chop Express, and I'm talkin'
to whoever's out there.
- Big Trouble in Little China (1986)


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Nate Wiger

Luke Palmer wrote:

Every regex engine in every language uses $1 or \1. This includes Java,
JavaScript, C, PHP, Python, awk, sed, the GNU regex libs, etc. Somehow
other languages seem ok with this, because it's a widely-used convention.


Perl 6's patterns are _not_ regexes anymore.  But I doubt that we
won't be imitated, because the new regexes are way better than the old
ones.  Breaking cruft for a reason and all that.


Ok, I'll wait on this one. I've said my piece. Maybe they'll go back and
update awk and sed after Perl 6 comes out. (Ok now I'm just being
sarcastic, sorry. :-)


The fact that we use . instead of - (like every other language on
the planet)?


You're using my argument for me - thanks. See above.


Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
Perl 6 from some non-Perl 5 language is going to be more comfortable
with dot.


No, no, you misread that completely. Basically, you're saying to use the
. for objects because everyone else does. I'm using the same
supporting argument (everyone else does) for why to start with $1.

BTW, C and PHP both use - still.


It sounds like you want a backwards-compatible change.  From the
outset we knew that this wasn't our goal.  Perl 5 is full to the brim
with syntax, and there's pretty much nowhere we can add anything, and
there's tons of cruft that we had to get rid of.

Consider Perl 6 to be a derivative, not an extension, of Perl 5.


I really do understand that - really. But I think things are getting a
bit overboard. The Latin-1 sigil is another discussion that nobody wants
to admit is a legit problem, despite numerous legitimate issues. Even
being able to type in the syntax itself is going to be problematic!

Anyways, you can listen or not listen to those of us from real, large,
corporate environments. I'm just trying to temper the enthusiasm for
many of the real improvements in Perl 6 with some of the real costs -
which are largely being ignored as no big deal.

I'm a big Perl advocate, but I guess I'm just not sure if I'm gonna be a 
big Perl 6 advocate yet. There's alot of downsides and real business risk.


-Nate


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Mark Reed
On 2005-10-21 1:54 PM, Nate Wiger [EMAIL PROTECTED] wrote:
 BTW, C and PHP both use - still.

C++ is probably more relevant than C, but since it inherited the syntax,
same diff.  But in their case the underlying form is still a dot;  A-B is
just syntactic sugar for (*A).B. The distinction involved doesn't really
exist in Perl, so it only needed one form, and $Larry decided to go with dot
for concatenation and the arrow for dereferencing.  Then enough other
languages made the opposite choice that a rethink was warranted.

PHP was just copying Perl5, so it doesn't count. :)
 
 I really do understand that - really. But I think things are getting a
 bit overboard. The Latin-1 sigil is another discussion that nobody wants
 to admit is a legit problem, despite numerous legitimate issues. Even
 being able to type in the syntax itself is going to be problematic!

It's more a case of having had the discussion over and over again already, I
think.  Nothing came up in this thread that hadn't been said before.  The
design team is aware of the issues - really.  They simply have decided that
the trade-off in legibility worth it.

 Anyways, you can listen or not listen to those of us from real, large,
 corporate environments. I'm just trying to temper the enthusiasm for
 many of the real improvements in Perl 6 with some of the real costs -
 which are largely being ignored as no big deal.

Again, I don't think it's no big deal so much as already acknowledged and
stipulated.  For instance, we already have non-ASCII operators, so the
introduction of ยข doesn't introduce any new issues of the sort being
discussed.


 I'm a big Perl advocate, but I guess I'm just not sure if I'm gonna be a
 big Perl 6 advocate yet. There's alot of downsides and real business risk.

I don't think there are a lot of downsides.  There is definitely a risk,
as with any new technology, and I'm largely adopting a wait-and-see attitude
myself, but I don't see any huge negatives anywhere.  What are these
downsides?

From a practical standpoint, it will be a while before I have to worry about
Perl6 professionally, because we're not going to want to use it until it's
been around long enough to have some kinks worked out.


 




Fwd: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-21 Thread Rob Kinyon
Feh - I really need to get on gmail's case for providing a keystroke
for Reply to All.

Rob

-- Forwarded message --
From: Nate Wiger [EMAIL PROTECTED]
Date: Oct 21, 2005 2:38 PM
Subject: Re: $1 change issues [was Re: syntax for accessing multiple
versions of a module]
To: Rob Kinyon [EMAIL PROTECTED]


Rob-

BTW, C and PHP both use - still.

 That's because PHP is a Perl templating engine that got too big for
 its britches. (http://www.devshed.com/c/a/PHP/An-Introduction-to-PHP/)

Hah, that's a funny way to look at it. Although, PHP forked back in
1997, reading the article. There's alot of stuff it does differently
nowadays, some better, some worse.

Anyways, you can listen or not listen to those of us from real, large,
corporate environments. I'm just trying to temper the enthusiasm for
many of the real improvements in Perl 6 with some of the real costs -
which are largely being ignored as no big deal.

 I think YOU forget that nearly everyone else on this list, including
 @Larry, has worked in large corporate environments. My understanding
 of the response has been Yes, there might be issues. They are all
 solveable with a little elbow grease. And, frankly, you can run every
 P5 program under Perl6. I'm not seeing what the problem is.

Fair enough. Maybe I'm just a whiner. That's possible.

But, I'm on the cusp of a major new outing, namely [snip]. The
point is, I don't like the idea of having to relearn a ton of stuff
midway thru the 5+ year product cycle of [snip]. So I'll probably end up
choosing a different language for the team to use, which is too bad.

-Nate

P.S. I didn't post this to the list, because you didn't


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-20 Thread Luke Palmer
On 10/20/05, Nate Wiger [EMAIL PROTECTED] wrote:
 Luke Palmer wrote:
 
  Okay, I may still be missing your point, so let me try to summarize
  just to be sure we're on the same page:  You say that the thing that
  is going to hinder migration to Perl 6 is the fact that it's different
  from Perl 5.

 Intentionally trite oversimplification.

Oh, sorry.  I was going to expand on that, but then the direction of
my message changed and I forgot to.  Sorry for my overall hostile
tone.  I'll try to conduct myself civilly for the rest of the
argument.

  Our target audience is only somewhat from a Perl 5 background.  People
  from Java, from Python, from C, and even just starting to program will
  be learning Perl 6, and they would rather have all the language be
  zero-based, rather than most of it being zero-based except for $1, $2,
  etc. (you were complaining about special exceptions if I recall).

 Every regex engine in every language uses $1 or \1. This includes Java,
 JavaScript, C, PHP, Python, awk, sed, the GNU regex libs, etc. Somehow
 other languages seem ok with this, because it's a widely-used convention.

Yeah, well, every other regex engine on the planet uses [] for
character classes, no other regex engine uses  for subrules, no
other regex engine uses a match object or nested capture numbering. 
Perl 6's patterns are _not_ regexes anymore.  But I doubt that we
won't be imitated, because the new regexes are way better than the old
ones.  Breaking cruft for a reason and all that.

 And you don't have to answer, but have you actually programmed in Java
 or Python? You seem to be speaking for alot of programmers.

Yes, yes.

You seem to be speaking for a lot of programmers, too.  We have to,
for if we didn't try, we probably wouldn't be good language designers.

  The reason I'm dismissing you as a complainer is because of your
  broad field of attack.  You say that the method syntax is starting to
  make [your] head spin. Well, what about it is making your head spin?

 The method: infix:+ stuff makes no sense to me, but I don't want to
 dwell on it.

Ahh, grammatical categories.  You may already know this, but let me
try to explain.  The category:symbol stuff is our way of letting the
user hook into the parser in common ways without them having to go and
explicitly change the grammar of the language.  Generally, that syntax
has nothing to do with it being a method.  Whatever you see inside the
quoter after the category is always introducing (or defining an
additional meaning for) a token, which I guess is why it's quoted.

  The fact that we use . instead of - (like every other language on
  the planet)?

 You're using my argument for me - thanks. See above.

Huh?   So you want to go back to Perl 5's arrow?  *Anybody* coming to
Perl 6 from some non-Perl 5 language is going to be more comfortable
with dot.

  [1] Which will be, what, eight hours for a Perl 5 programmer?  Have
  you ever spent a month trying to learn, oh, say, Haskell?  Because
  people do that, too.

 There are more components to this that just the learning time for one
 person. There are project teams, sustaining engineering for existing
 projects, etc. And that's not even counting management tape. Real-world,
 profitable computing is a big, ugly, nasty beast.

Which is why we're going to great lengths to make sure that your Perl
5 code and your Perl 6 code can run together.

use perl5:DBI;

The transition to Perl 6 doesn't mean that /usr/bin/perl is going to
change to version six under your feet and all your code will break.

 If Perl 6 is going to be successful, this means it must change the
 fewest key things with the most benefits. This may mean some things that
 aren't quite perfect still don't get changed. (It also means lots of
 new stuff can still be added - I'm just talking change.)

It sounds like you want a backwards-compatible change.  From the
outset we knew that this wasn't our goal.  Perl 5 is full to the brim
with syntax, and there's pretty much nowhere we can add anything, and
there's tons of cruft that we had to get rid of.

Consider Perl 6 to be a derivative, not an extension, of Perl 5.

Luke


Re: $1 change issues [was Re: syntax for accessing multiple versions of a module]

2005-10-20 Thread Jonathan Scott Duff
On Thu, Oct 20, 2005 at 05:12:32PM -0700, Nate Wiger wrote:
 Every regex engine in every language uses $1 or \1. This includes Java,
 JavaScript, C, PHP, Python, awk, sed, the GNU regex libs, etc. Somehow
 other languages seem ok with this, because it's a widely-used convention.

This quibbling over $0 and $1 seems like rampant bikeshedding to me.
Given that @Larry has said that $0, $1, etc. correspond to $/[0], $/[1],
etc, if you want to keep $1 as the first parenthesized part, then come
up with a compelling, concrete proposal for what to do with $/[0] (and
$0) keeping in mind that

@array = /(foo)(bar)(baz)/;

has to do the right thing.

 That's not my wish; just that it's time to take another look at the
 list of changes to see where the real-world benefit is.

IMHO, self consistency is far and away more important than consistency
with perl5.

 If Perl 6 is going to be successful, this means it must change the
 fewest key things with the most benefits. This may mean some things that
 aren't quite perfect still don't get changed. (It also means lots of
 new stuff can still be added - I'm just talking change.)

I don't understand this. Change the fewest key things relative to
what? Perl5?  If so, why?  Is it not enough that perl5 programs will
still compile and run under perl6?

 Just food for thought... maybe I'm wrong...

I don't know about wrong, but you're certainly entering the game a
little late.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]