Re: Backticks (was: Angle quotes and pointy brackets)

2004-11-29 Thread Smylers
Juerd writes: > Luke Palmer skribis 2004-11-29 16:10 (-0700): > > > It says that backticks won't be used at all in Perl 6. > > It says that, but after saying "Leaving aside the use of C<``> as a > term ...". And that use of backticks is what this subthread appears to > be about. As I interpret i

Re: Backticks (was: Angle quotes and pointy brackets)

2004-11-29 Thread Luke Palmer
Juerd writes: > Luke Palmer skribis 2004-11-29 16:10 (-0700): > > > > http://groups.google.com/groups?selm=20040420175551.GA16162%40wall.org&rnum=1clarify > > > > It says that backticks won't be used at all in Perl 6. That's (the) one > > key of the keyboard that we're leaving to user-defin

Re: Backticks (was: Angle quotes and pointy brackets)

2004-11-29 Thread Juerd
Luke Palmer skribis 2004-11-29 16:10 (-0700): > > http://groups.google.com/groups?selm=20040420175551.GA16162%40wall.org&rnum=1clarify > > It says that backticks won't be used at all in Perl 6. That's (the) one > key of the keyboard that we're leaving to user-definition. It says that, but

Re: Backticks (was: Angle quotes and pointy brackets)

2004-11-29 Thread Luke Palmer
Jon Ericson writes: > Matthew Walton <[EMAIL PROTECTED]> writes: > > > James Mastros wrote: > >> Larry Wall wrote: > >>> Well, yes, but sometimes the weights change over time, so it doesn't > >>> hurt (much) to reevaluate occasionally. But in this case, I think I > >>> still prefer to attach the

Re: backticks

2004-04-20 Thread Luke Palmer
Juerd writes: > Peter Haworth skribis 2004-04-20 14:56 (+0100): > > > I think %hash<> is best explained as %hash{ << key key > > > key >> } with implicit curlies, not as an alternative to curlies. > > In that case, why aren't you suggesting something more in line with that? > > Here's what I'd lik

Re: backticks

2004-04-20 Thread Juerd
Peter Haworth skribis 2004-04-20 14:56 (+0100): > > I think %hash<> is best explained as %hash{ << key key > > key >> } with implicit curlies, not as an alternative to curlies. > In that case, why aren't you suggesting something more in line with that? > Here's what I'd like to see instead of your

Re: backticks

2004-04-20 Thread Peter Haworth
On Fri, 16 Apr 2004 23:45:48 +0200, Juerd wrote: > Jonathan Scott Duff skribis 2004-04-16 15:51 (-0500): > > Except that you've put things in this explanation that shouldn't be > > there IMHO. The %varname<> is a special case, but not of "getting a > > single item from a hash", rather it's a specia

community involvement - Was: Re: backticks

2004-04-20 Thread Scott Walters
Since this horse came back to life, I'm going to give it a good thrashing, and I've got goons to help me. I've asked the Phoenix Perl Mongers for their take on the situation. I've posted a _completely_ unbiased synopsis of the situation. Here are excerpts from the replies: Tony's take: "Rename

Re: backticks (or slash, maybe)

2004-04-19 Thread Damian Conway
Sean O'Rourke wrote: > I'm saying "division" is now defined such that when the numerator is > a hash(-ref), the result is the set of values associated with the > denominator. I've never tried to divide a hash or hashref by > something without it being a bug. Right...in Perl 5. In Perl 6, a hash

Re: backticks (or slash, maybe)

2004-04-19 Thread Juerd
Sean O'Rourke skribis 2004-04-19 15:34 (-0700): > I'm saying "division" is now defined such that when the numerator is > a hash(-ref), the result is the set of values associated with the > denominator. I've never tried to divide a hash or hashref by > something without it being a bug. I understan

Re: backticks (or slash, maybe)

2004-04-19 Thread Matthijs van Duin
On Mon, Apr 19, 2004 at 03:34:13PM -0700, Sean O'Rourke wrote: in a '/' is a regex, anything otherwise is a hash slice. I don't understand. Could you give some examples? Is this in the context of bare /path/to/foo, even? /foo/ # trailing slash -- so it's a regexp (m/foo/) /foo\/bar/ #

Re: backticks (or slash, maybe)

2004-04-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: > Sean O'Rourke skribis 2004-04-19 15:11 (-0700): >> > I'd hate to give up dividing slash. It's one of the few operators that I >> > sometimes type without whitespace. Simple because 1/10 is good enough >> > and 1 / 10 is very wide. >> You can have both, though. >

Re: backticks (or slash, maybe)

2004-04-19 Thread Juerd
Sean O'Rourke skribis 2004-04-19 15:11 (-0700): > > I'd hate to give up dividing slash. It's one of the few operators that I > > sometimes type without whitespace. Simple because 1/10 is good enough > > and 1 / 10 is very wide. > You can have both, though. But not in a way that makes $foo/$bar div

Re: backticks (or slash, maybe)

2004-04-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: > Angel Faus skribis 2004-04-19 22:43 (+0200): >> If we really need a ultra-huffman encoding for hash subscriptors, I >> have always dreamt of being able to do: >> %hash/key >> $hashref/foo/bar/baz/quux >> ... > > I'd hate to give up dividing slash. It's on

Re: backticks (or slash, maybe)

2004-04-19 Thread Juerd
Angel Faus skribis 2004-04-19 22:43 (+0200): > If we really need a ultra-huffman encoding for hash subscriptors, I > have always dreamt of being able to do: > %hash/key > $hashref/foo/bar/baz/quux > ... I'd hate to give up dividing slash. It's one of the few operators that I sometimes type

Re: backticks (or slash, maybe)

2004-04-19 Thread Angel Faus
MiƩrcoles 14 Abril 2004 14:18, Juerd wrote: > I propose to use ` as a simple hash subscriptor, as an alternative > to {} and <<>>. It would only be useable for \w+ keys or perhaps > -?\w+. As with methods, a simple "atomic" (term exists only in > perlreftut, afaix, but I don't know another word to

Re: backticks

2004-04-17 Thread Juerd
Trey Harris skribis 2004-04-16 12:05 (-0700): > I'm asking you to stop interpreting disagreement as censorship, prejudice, > closed-mindedness, or whatever else. It's not. I never did interpret disagreement as anything but disagreement, and never said that I think everyone who disagrees is closed

Re: backticks

2004-04-17 Thread David Storrs
Folks, this discussion seems to be spinning. All the points, on both sides, have been made and are being repeated with only slight variation. We've all made our cases--why don't we drop the issue for a while and let Larry ruminate? I think we can all agree that he will give the idea a fair heari

Re: backticks

2004-04-17 Thread Trey Harris
In a message dated Fri, 16 Apr 2004, Juerd writes: > Except for the shocking number of closed-minded people on this list. Stop it, stop it, STOP IT. I'm not asking you to stop voicing your opinion about the discussion at hand--that would be closed-minded, after all. I'm asking you to stop interp

Re: backticks

2004-04-17 Thread Juerd
John Williams skribis 2004-04-16 18:32 (-0600): > You didn't answer his question, "which is less complicated?" Wasn't that a rhetociral question? Juerd

Re: backticks

2004-04-17 Thread Matthew Walton
Juerd wrote: Sean O'Rourke skribis 2004-04-15 8:55 (-0700): I find that there are still plenty of contexts in which `` is nice and security is irrelevant. This is the second time in this thread that I read about security being unimportant. I still don't know what to say about it, though I feel l

Re: backticks

2004-04-16 Thread John Williams
On Fri, 16 Apr 2004, Juerd wrote: > Defining ` to be a bareword quoting operator would be only one step away > from what I suggested initially: > > 1. %hash`key > 2. %array`5 > 3. :key`value > > 4. say `hello; > > This would make it like <<>> now, but allowing only one bareword, and > only if it is

Re: backticks

2004-04-16 Thread Juerd
Jonathan Scott Duff skribis 2004-04-16 15:51 (-0500): > > To get an item out of a hash, you can write %varname{"key"}. > > You can also write %varname<> if there aren't any spaces in > > the key. Finally, if the key doesn't have any characters in it > > except for letters, numbers

Re: backticks

2004-04-16 Thread John Macdonald
On Fri, Apr 16, 2004 at 03:12:58PM -0400, Aaron Sherman wrote: > On Fri, 2004-04-16 at 12:35, Juerd wrote: > > > backticks encourage interpolation. > > ... and? > > >From the point of view of a Web developer who deals with (potentially) > hostile data, I see the problem (though the solution is s

Re: backticks

2004-04-16 Thread John Macdonald
On Fri, Apr 16, 2004 at 09:16:15PM +0200, Juerd wrote: > However, I could be guessing badly. It could be that someone who says > Perl 6 should not have a third syntax because there are already two > really has thought about it. We have many ways of saying "foo() if not > $bar" in Perl 5 and I use m

Re: backticks

2004-04-16 Thread Jonathan Scott Duff
On Fri, Apr 16, 2004 at 01:17:10PM -0700, Brent 'Dax' Royal-Gordon wrote: > I don't claim that they won't be used often. I claim that the *best* > solution is to fix the syntax we already have, not add more. Failing > that, we should make sure that the syntax we add is as globally useful > as

Re: backticks

2004-04-16 Thread Aaron Sherman
On Fri, 2004-04-16 at 12:35, Juerd wrote: > backticks encourage interpolation. ... and? >From the point of view of a Web developer who deals with (potentially) hostile data, I see the problem (though the solution is smarter tainting, not removing functionality). From the point of view of a gener

Re: backticks

2004-04-16 Thread Juerd
Brent 'Dax' Royal-Gordon skribis 2004-04-16 13:17 (-0700): > Clever definition of the colon operator, or creation of a > bareword-quoting operator, would allow you to use "barewords" anywhere > you wanted to. Defining ` to be a bareword quoting operator would be only one step away from what I sugg

Re: backticks

2004-04-16 Thread Brent 'Dax' Royal-Gordon
Jonathan Scott Duff wrote: On Fri, Apr 16, 2004 at 10:44:47AM -0700, Brent 'Dax' Royal-Gordon wrote: Regex aliases, threads, lexicals, junctions, and dwimmery make things a *lot* easier to program. This syntactic sugar you're proposing doesn't. But it *does* make an oft-used construct easier to

Re: backticks

2004-04-16 Thread Juerd
Larry Wall skribis 2004-04-16 11:50 (-0700): > On Fri, Apr 16, 2004 at 07:12:44PM +0200, Juerd wrote: > : Except for the shocking number of closed-minded people on this list. > You seem to be one of them. From my point of view, you've had your > ego plastered all over this proposal from the start,

Re: backticks

2004-04-16 Thread Matthijs van Duin
On Fri, Apr 16, 2004 at 07:12:44PM +0200, Juerd wrote: Aaron Sherman skribis 2004-04-16 9:52 (-0400): 3. You proposed (late in the conversation) that both could co-exist, and while that's true from a compiler point of view, it also leads to: `stuff``stuff`stuff Huh? No. That is a syntax er

Re: backticks

2004-04-16 Thread Jonathan Scott Duff
On Fri, Apr 16, 2004 at 10:44:47AM -0700, Brent 'Dax' Royal-Gordon wrote: > Regex aliases, threads, lexicals, junctions, and dwimmery make things a > *lot* easier to program. This syntactic sugar you're proposing doesn't. But it *does* make an oft-used construct easier to type. That adds up ov

Re: backticks

2004-04-16 Thread Juerd
David Wheeler skribis 2004-04-16 7:56 (-0700): > And I'll bet it's something like this: > for my $i (0..$#thingies) { > my $css_class = $i % 2 ? 'blue' : 'yellow'; > print "$thingies[$i]\n"; > } Probably. Can't we in Perl 6 just use something like this? for @thingies, qw(bl

Re: backticks

2004-04-16 Thread Juerd
Aaron Sherman skribis 2004-04-16 9:52 (-0400): > 3. You proposed (late in the conversation) that both could co-exist, and > while that's true from a compiler point of view, it also leads to: > `stuff``stuff`stuff Huh? No. That is a syntax error. > $a`a=$a`b~`a` # Try to tell your edi

Re: backticks

2004-04-16 Thread Juerd
David Wheeler skribis 2004-04-16 9:58 (-0700): > >for @thingies, qw(blue yellow) xx Inf -> $thingy, $class { > >print qq[$thingy\n"; > >} > I think that $class would be C after the second record in > @thingies, unfortunately. Even with the "xx Inf"? Why? Juerd

Re: backticks

2004-04-16 Thread Juerd
Brent 'Dax' Royal-Gordon skribis 2004-04-16 0:25 (-0700): > Number of keystrokes isn't our only concern here. This is Perl, not > APL--we care about the size of the language and its intuitiveness too. > (Perhaps not much, but we do.) Not the only concern, but to me, it is as important as reada

Re: backticks

2004-04-16 Thread Juerd
Sean O'Rourke skribis 2004-04-15 8:55 (-0700): > [EMAIL PROTECTED] (Juerd) writes: > > I think it has to go because `pwd`, `hostname`, `wget -O - $url` > > should not be easier than the purer Perl equivalents and because > > ``'s interpolation does more harm than good. > I have to disagree with yo

Re: backticks

2004-04-16 Thread Brent 'Dax' Royal-Gordon
Juerd wrote: Brent 'Dax' Royal-Gordon skribis 2004-04-16 0:25 (-0700): I don't like %hash{'foo'} because it's ugly. I don't like %hash<> because it's ugly and adds syntax. I don't like %hash`foo because it's ugly, adds syntax, and looks nothing like an indexing operator. (I'll revisit this t

Re: backticks

2004-04-16 Thread David Wheeler
On Apr 16, 2004, at 10:14 AM, Juerd wrote: Even with the "xx Inf"? Why? Oh, right, missed that. Sorry. David

Re: backticks

2004-04-16 Thread Mark J. Reed
On 2004-04-16 at 08:50:38, Brent 'Dax' Royal-Gordon wrote: > Mark J. Reed wrote: > >Nope. I'd be perfectly happy if the modulus operator were spelled "mod" > >instead of %, which has never struck me as particularly intuitive. > > I always saw it as being a funny division sign. See the little s

RE: backticks

2004-04-16 Thread Austin Hastings
> -Original Message- > From: Mark J. Reed [mailto:[EMAIL PROTECTED] > Sent: Friday, 16 April, 2004 11:43 AM > To: [EMAIL PROTECTED] > Subject: Re: backticks > > > On 2004-04-16 at 11:17:41, Austin Hastings wrote: > > I'm totally willing to agree w

Re: backticks

2004-04-16 Thread Brent 'Dax' Royal-Gordon
Mark J. Reed wrote: Nope. I'd be perfectly happy if the modulus operator were spelled "mod" instead of %, which has never struck me as particularly intuitive. I always saw it as being a funny division sign. See the little slash in there? -- Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]> Perl an

Re: backticks

2004-04-16 Thread Mark J. Reed
On 2004-04-16 at 11:17:41, Austin Hastings wrote: > I'm totally willing to agree with you, Mark. > A) Do you code hashing algorithms so frequently that you need a special, > low-cost-of-access operator built in to the language to support it? Nope. I'd be perfectly happy if the modulus operator w

Re: backticks

2004-04-16 Thread Aaron Sherman
On Fri, 2004-04-16 at 10:56, David Wheeler wrote: > On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote: > > > I'll bet you the actual most *common* use of modulus is: [...] > > print $percent_done,"\n" unless $percent_done % 10; > And I'll bet it's something like this: > my $css_class =

RE: backticks

2004-04-16 Thread Austin Hastings
> -Original Message- > From: David Wheeler [mailto:[EMAIL PROTECTED] > > On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote: > > > I'll bet you the actual most *common* use of modulus is: > > > > until ( my ($percent_done=done()) == 100 ) { > > do_work(); > > print $perce

RE: backticks

2004-04-16 Thread Austin Hastings
> -Original Message- > From: Mark J. Reed [mailto:[EMAIL PROTECTED] > > On 2004-04-15 at 19:39:25, Austin Hastings wrote: > > Of course you used for buffers that were not powers of 2. Had they > > been powers of 2, you would have used & or &~. The fact that you > > didn't use a power of 2

Re: backticks

2004-04-16 Thread David Wheeler
On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote: I'll bet you the actual most *common* use of modulus is: until ( my ($percent_done=done()) == 100 ) { do_work(); print $percent_done,"\n" unless $percent_done % 10; } And I'll bet it's something like this: for my $i (0..$#t

Re: backticks

2004-04-16 Thread Simon Cozens
[EMAIL PROTECTED] (Mark J. Reed) writes: > > The biggest use of modulus is in implementing hashes > > Rather, one of the biggest uses. I don't have documentation to support > the claim that it is the biggest, and there are certainly others - > date arithmetic, astronomy etc. I'll bet you the ac

Re: backticks

2004-04-16 Thread Mark J. Reed
On 2004-04-16 at 09:23:44, Mark J. Reed wrote: > On 2004-04-15 at 19:39:25, Austin Hastings wrote: > > Of course you used for buffers that were not powers of 2. Had they > > been powers of 2, you would have used & or &~. The fact that you > > didn't use a power of 2 is pretty questionable. The dr

Re: backticks

2004-04-16 Thread Mark J. Reed
On 2004-04-16 at 00:25:51, Brent 'Dax' Royal-Gordon wrote: > Number of keystrokes isn't our only concern here. This is Perl, not > APL--we care about the size of the language and its intuitiveness too. > (Perhaps not much, but we do.) In any case, Perl is far more typable than APL unless you ha

Re: backticks

2004-04-16 Thread Mark J. Reed
On 2004-04-15 at 19:39:25, Austin Hastings wrote: > Of course you used for buffers that were not powers of 2. Had they > been powers of 2, you would have used & or &~. The fact that you > didn't use a power of 2 is pretty questionable. The dread Unix > wizards will no doubt have questions for you

Re: backticks

2004-04-16 Thread Juerd
Austin Hastings skribis 2004-04-15 19:37 (-0400): > I'm sure that if Juerd or someone were to write a "PublicHash" class, > they would cleverly reverse the access so that some collision-unlikely > path would get the methods. I'm sure I have explained several times already why I think using the . o

Re: backticks

2004-04-16 Thread Juerd
Brent 'Dax' Royal-Gordon skribis 2004-04-15 16:56 (-0700): > 1. Allow %hash<> to be typed as %hash. There would be a >conflict with numeric less-than, but we can disambiguate with >whitespace if necessary. After all, we took the same solution with >curlies. Curlies which, as said, I

Re: backticks

2004-04-16 Thread John Macdonald
On Thu, Apr 15, 2004 at 12:27:12PM -0700, Scott Walters wrote: > * Rather than eliciting public comment on %hash`foo (and indeed %hash<>) > the proposal is being rejected out of hand (incidentally, the mantra of the Java > community Process seems to be "you don't need X, you've got Y", and it took

Re: backticks

2004-04-16 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: > I think it has to go because `pwd`, `hostname`, `wget -O - $url` > should not be easier than the purer Perl equivalents and because > ``'s interpolation does more harm than good. I have to disagree with you here. The Perl way is not always the Perl way -- the b

Re: backticks

2004-04-16 Thread Luke Palmer
Brent 'Dax' Royal-Gordon writes: > "If the inside of a hash indexer consists entirely of \w characters, it > will be interpreted as the name of a hash key. If you want it to call a > subroutine instead, add a ~ stringifying operator to the beginning of > the call, or a pair of parentheses to th

Re: backticks

2004-04-16 Thread Brent 'Dax' Royal-Gordon
Juerd wrote: Brent 'Dax' Royal-Gordon skribis 2004-04-15 16:56 (-0700): 1. Allow %hash<> to be typed as %hash. There would be a conflict with numeric less-than, but we can disambiguate with whitespace if necessary. After all, we took the same solution with curlies. Curlies which, as said,

Re: backticks

2004-04-15 Thread Luke Palmer
Austin Hastings writes: > If you think about it, what we really ought to do is train ourselves > to "reverse" the numbers row on our keyboards. If we're doing a good > job about avoiding magic numbers, then " $ % & ( ) are going > to be much more frequently used than 2 4 5 7 9 0, so why don't we >

Re: backticks

2004-04-15 Thread Brent 'Dax' Royal-Gordon
Juerd wrote: I think %hash`key makes sense. But I'd like to find out if more people like this idea. We already have two hash dereference syntaxes. That's arguably one too many as it is. Let's fix the deficiencies in the syntax we have, rather than adding even more syntax with even more deficienci

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED] > > On Thu, Apr 15, 2004 at 06:38:34PM -0400, Austin Hastings wrote: > > The use of % as a modulo operator is purely a legacy from 'C', > > where it was a failure: in 'C', the only number you care about > > for

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Luke Palmer [mailto:[EMAIL PROTECTED] > Austin Hastings writes: > > > From: Juerd [mailto:[EMAIL PROTECTED] > > > Austin Hastings skribis 2004-04-15 18:38 (-0400): > > > > $foo % bar > > > > > > " % " is 4 keys: space, shift, 5, space. Too much, IMHO. > > >

Re: backticks

2004-04-15 Thread Luke Palmer
Austin Hastings writes: > > -Original Message- > > From: Juerd [mailto:[EMAIL PROTECTED] > > > > Austin Hastings skribis 2004-04-15 18:38 (-0400): > > > $foo % bar > > > > " % " is 4 keys: space, shift, 5, space. Too much, IMHO. > > > > Typability and readability are both VERY important.

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Juerd [mailto:[EMAIL PROTECTED] > > Austin Hastings skribis 2004-04-15 18:38 (-0400): > > $foo % bar > > " % " is 4 keys: space, shift, 5, space. Too much, IMHO. > > Typability and readability are both VERY important. In that case, why not define a Class::H

Re: backticks

2004-04-15 Thread Scott Walters
Ack - well, I was downright antagonistic, so I really earned it. I can only try to accept criticism as well as the rest of the list has. Apology accepted of course, and an apology of my own to the list who had to suffer me and chromatic who didn't take me too seriously ;) -scott On 0, chroma

Re: backticks

2004-04-15 Thread Jonathan Scott Duff
On Thu, Apr 15, 2004 at 06:38:34PM -0400, Austin Hastings wrote: > The use of % as a modulo operator is purely a legacy from 'C', where it was > a failure: in 'C', the only number you care about for modulus is some power > of 2, and you get those using bitwise-and anyway. I disagree with this comp

Re: backticks

2004-04-15 Thread Juerd
Austin Hastings skribis 2004-04-15 18:38 (-0400): > $foo % bar " % " is 4 keys: space, shift, 5, space. Too much, IMHO. Typability and readability are both VERY important. Juerd

Re: backticks

2004-04-15 Thread Juerd
Thomas A. Boyer skribis 2004-04-15 16:22 (-0600): > But I really hate the idea of removing `...` and leaving qx/.../. That > would leave qx// in the unenviable position of being the only > "quote-like operator" that doesn't have a corresponding quote-like > syntax. s, rx, tr > After all, the o

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Matthijs van Duin [mailto:[EMAIL PROTECTED] > On Fri, Apr 16, 2004 at 12:14:08AM +0200, Juerd wrote: > >%foo is a hash. When I see %foo%bar, it feels like that should be a hash > >too. Besides that, $foo%bar looks funny and @[EMAIL PROTECTED] does so even mor

Re: backticks

2004-04-15 Thread Matthijs van Duin
On Fri, Apr 16, 2004 at 12:14:08AM +0200, Juerd wrote: %foo is a hash. When I see %foo%bar, it feels like that should be a hash too. Besides that, $foo%bar looks funny and @[EMAIL PROTECTED] does so even more. Not to mention @[EMAIL PROTECTED] I like ` because it's a small but recognisable glyph. (

Re: backticks

2004-04-15 Thread Thomas A. Boyer
Luke Palmer wrote: That said, I have mixed feelings about the idea. I am thoroughly convinced that ` can leave it's current job. Removing qx// would be going a leap too far. But I really hate the idea of removing `...` and leaving qx/.../. That would leave qx// in the unenviable position of

Re: backticks

2004-04-15 Thread Juerd
Austin Hastings skribis 2004-04-15 18:09 (-0400): > If we're going to entertain alternatives, why not use % as the hash > subscriptor? > To borrow from another thread: > %foo%monday%food = 10; > %foo%monday%travel = 100; > %foo%tuesday%food = 10; > %foo%tuesday%travel = 150; There is as fa

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Juerd [mailto:[EMAIL PROTECTED] > Sent: Thursday, 15 April, 2004 05:09 PM > To: Dave Mitchell > Cc: [EMAIL PROTECTED] > Subject: Re: backticks > > > Dave Mitchell skribis 2004-04-15 21:56 (+0100): > > If hypothetically w

Re: backticks

2004-04-15 Thread David Storrs
On Thu, Apr 15, 2004 at 11:45:27AM +0200, Juerd wrote: > David Storrs skribis 2004-04-14 22:39 (-0700): > > Very top row, one space right of the F12 key. Extremely awkward. > > (This is a US keyboard on a Dell Inspiron 5100 laptop.) > > That is inconvenient. Yup. > > 1) ` looks like it should b

Re: backticks

2004-04-15 Thread chromatic
On Thu, 2004-04-15 at 13:37, Larry Wall wrote: > Well, I, for one, think chromatic was right on the money. No matter how right my thoughts might have been, my tone *was* rude and that's not right. Apologies to Scott. -- c

Re: backticks

2004-04-15 Thread Juerd
Dave Mitchell skribis 2004-04-15 21:56 (+0100): > If hypothetically we *are* going to have a simplfied constant-index hash > access syntax, is there any reason why we can't use a single quote (') > rather than backtick ('), akin to the Perl4-ish package separator, > ie %foo'bar rather than %foo`bar

Re: backticks

2004-04-15 Thread Juerd
Mark J. Reed skribis 2004-04-15 16:49 (-0400): > If I might offer a modest counter-proposal - how about a fallback method > (the equivalent of Perl5's AUTOLOAD or Ruby's method_missing, however > that winds up being spelled in Perl6) that would return the value of the > key equal to the requested m

Re: backticks

2004-04-15 Thread Mark J. Reed
On 2004-04-15 at 16:49:28, Mark J. Reed wrote: > Not sure that JavaScript is relevant here, since the "equivalent" > syntax there, ".", is the same as the method call syntax. But see my > proposal below. Before the nit-pickers jump in, I was oversimplifying above. The "method call syntax" in Jav

Re: backticks

2004-04-15 Thread Dave Mitchell
If hypothetically we *are* going to have a simplfied constant-index hash access syntax, is there any reason why we can't use a single quote (') rather than backtick ('), akin to the Perl4-ish package separator, ie %foo'bar rather than %foo`bar? On the grounds that personally I hate the backtick

Re: backticks

2004-04-15 Thread Mark J. Reed
Scott> * %hash`s is an example of a small thing that would be easy to implement Scott> in core but would be used constantly (if JavaScript is any indication, Scott> every few lines), giving a lot of bang for the buck Not sure that JavaScript is relevant here, since the "equivalent" syntax there

Re: backticks

2004-04-15 Thread Larry Wall
On Thu, Apr 15, 2004 at 01:26:47PM -0700, Scott Walters wrote: : So, my apologies to who anyone who feels unfairly or excessively criticized, : except chromatic. There is no forgiveness for someone who seeks out irked people : with the single goal of further irking them. Since chromatic is so eager

RE: backticks

2004-04-15 Thread Austin Hastings
> -Original Message- > From: Scott Walters [mailto:[EMAIL PROTECTED] > Sent: Thursday, 15 April, 2004 03:27 PM > To: [EMAIL PROTECTED] Juerd > Cc: [EMAIL PROTECTED] > Subject: Re: backticks > > > Let me summerize my undestanding of this (if my bozo bit isn&

Re: backticks

2004-04-15 Thread Scott Walters
It's you. * My objection to the Java community process applies in _some_ _small_ part to the Perl community process. I present it as a negative ideal with the implication that it should be avoided. * My objection to it being rejected out of hand applies not to the Perl community process no

Re: backticks

2004-04-15 Thread Matthijs van Duin
On Thu, Apr 15, 2004 at 12:27:12PM -0700, Scott Walters wrote: Let me summerize my undestanding of this (if my bozo bit isn't already irrevocably set): * %hash<> retains the features of P5 $hash{foo} but does nothing to counter the damage of removal of barewords Actually, %hash<> will be like p5

Re: backticks

2004-04-15 Thread chromatic
On Thu, 2004-04-15 at 12:27, Scott Walters wrote: Without commenting on the rest of the proposal, please allow me to clear up one point: > * Rather than eliciting public comment on %hash`foo (and indeed %hash<>) > the proposal is being rejected out of hand This whole thread *is* public comment.

Re: backticks

2004-04-15 Thread Scott Walters
Let me summerize my undestanding of this (if my bozo bit isn't already irrevocably set): * %hash<> retains the features of P5 $hash{foo} but does nothing to counter the damage of removal of barewords * %hash`foo occupies an important nitch, trading features (slice, autovivication) to optmize for

Re: backticks

2004-04-15 Thread Juerd
Aaron Sherman skribis 2004-04-15 14:29 (-0400): > On Wed, 2004-04-14 at 16:56, Juerd wrote: > > How many of those backticks > Note, those weren't backticks, those were programs. There were 123 > PROGRAMS that used backticks or equivalent syntax. I said backticks, and I meant backticks. I'm not sur

Re: backticks

2004-04-15 Thread Juerd
Aaron Sherman skribis 2004-04-14 16:40 (-0400): > >From a source tree I work with (which I cannot divulge code from, but I > think statistics like this are fine): > $ find . -name \*.pl | wc -l > 330 > $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | wc -l

Re: backticks

2004-04-15 Thread Aaron Sherman
On Wed, 2004-04-14 at 17:04, Simon Cozens wrote: > [EMAIL PROTECTED] (Aaron Sherman) writes: > > `` gets used an awful lot > > But that's in Perl 5, which is a glue language. I'm not sure I fully agree with that. Perl 5 *can* be a glue language, and so can Perl 6. They are not terribly distinct

Re: backticks

2004-04-15 Thread Juerd
David Storrs skribis 2004-04-14 22:39 (-0700): > Very top row, one space right of the F12 key. Extremely awkward. > (This is a US keyboard on a Dell Inspiron 5100 laptop.) That is inconvenient. > 1) ` looks like it should be a bracketing operator I think you means circumfix/balanced operator.

Re: backticks

2004-04-15 Thread Juerd
Chris skribis 2004-04-14 17:07 (-0700): > Perhaps this is naive, but couldn't something like this be achieved in a > manner similar to how I just implemented it in Ruby? Surely Perl will have > similar capabilities to handle unknown methods. As explained in <[EMAIL PROTECTED]>, it's not a questio

Re: backticks

2004-04-14 Thread Trey Harris
In a message dated Wed, 14 Apr 2004, David Storrs writes: > Actually, what I'd like to know is when it was decided that %hash{key} > meant %hash{key()}?? Was it in one of the Apocalypses? Perhaps it wasn't spelled out, but the implication was certainly there. Barewords are gone. Braces create a

Re: backticks

2004-04-14 Thread David Storrs
On Wed, Apr 14, 2004 at 10:06:23PM +0200, Juerd wrote: > > If on your keyboard ` is in a worse place than {}, I'd like to know > where it is. > > Juerd Very top row, one space right of the F12 key. Extremely awkward. (This is a US keyboard on a Dell Inspiron 5100 laptop.) Please put me down a

Re: backticks

2004-04-14 Thread Dave Whipp
"Jonathan Scott Duff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote: > >And Perl 6 isn't? I use backticks quite a bit in Perl, and I don't see > > that changing if I upgrade to Perl 6. > > Me too, but I write my backti

Re: backticks

2004-04-14 Thread Jonathan Scott Duff
On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote: > > [EMAIL PROTECTED] (Aaron Sherman) writes: > > > $ find . -name \*.pl | wc -l > > > 330 > > > $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | > wc -l > > > 123 > > > > > > `` gets

Re: backticks

2004-04-14 Thread Joe Gottman
- Original Message - From: "Simon Cozens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 14, 2004 5:04 PM Subject: Re: backticks > [EMAIL PROTECTED] (Aaron Sherman) writes: > > $ find . -name \*.pl | wc -l > >

RE: backticks

2004-04-14 Thread Chris
Perhaps this is naive, but couldn't something like this be achieved in a manner similar to how I just implemented it in Ruby? Surely Perl will have similar capabilities to handle unknown methods. class Hash def method_missing(method_name) str = method.id2name if str =~ /^\w+$/ then

Re: backticks

2004-04-14 Thread Luke Palmer
Scott Walters writes: > Juerd, > > You'd do well to not remove the conclusion of my post when the conclusion > is that the I strongly support you. Otherwise, your reply, read out of > context, sounds like you're fending off an attacker ;) > > People would do well to seperate the merits of the ide

Re: backticks

2004-04-14 Thread Scott Walters
I propose we pretend that $$foo = 'bar' stills work and use that as a benchmark for hash subscripting ease. If it requires fewer keystrokes or neuron fires to write Perl 4 code, then Perl 6 might be succeding on the programming in the small but failing at programming in the large. ${'bar'} =

Re: backticks

2004-04-14 Thread Scott Walters
Juerd, You'd do well to not remove the conclusion of my post when the conclusion is that the I strongly support you. Otherwise, your reply, read out of context, sounds like you're fending off an attacker ;) People would do well to seperate the merits of the idea from the merits of the suggested

Re: backticks

2004-04-14 Thread Jarkko Hietaniemi
> hash slices aren't used much at all. People *always* overgeneralize.

  1   2   >