On Wed, Apr 14, 2004 at 02:18:48PM +0200, 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
On Wed, 2004-04-14 at 05:18, Juerd wrote:
> I think %hash`key makes sense. But I'd like to find out if more people
> like this idea.
How do you request a hash slice with backticks?
-- c
On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote:
> On Wed, 2004-04-14 at 05:18, Juerd wrote:
>
> > I think %hash`key makes sense. But I'd like to find out if more people
> > like this idea.
>
> How do you request a hash slice with backticks?
I think you wouldn't. For that the more verb
chromatic skribis 2004-04-14 12:07 (-0700):
> > I think %hash`key makes sense. But I'd like to find out if more people
> > like this idea.
> How do you request a hash slice with backticks?
You don't. There are %foo<> and %foo{'foo', 'bar'} already and
hash slices aren't used much at all.
The prop
Jonathan Scott Duff skribis 2004-04-14 14:21 (-0500):
> On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote:
> > On Wed, 2004-04-14 at 05:18, Juerd wrote:
> > > I think %hash`key makes sense. But I'd like to find out if more people
> > > like this idea.
> > How do you request a hash slice wit
On Wed, 2004-04-14 at 12:24, Juerd wrote:
> chromatic skribis 2004-04-14 12:07 (-0700):
> > > I think %hash`key makes sense. But I'd like to find out if more people
> > > like this idea.
> > How do you request a hash slice with backticks?
> You don't. There are %foo<> and %foo{'foo', 'bar'} alrea
On Wed, 14 Apr 2004, 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 describe a
chromatic skribis 2004-04-14 12:32 (-0700):
> That's exactly my objection to this idea. I think it goes too far to
> make simple things simpler while making complex things impossible.
Absolutely false.
This is an addition to the already existing {}, which should stay.
%foo{ something } will stil
John Williams skribis 2004-04-14 13:36 (-0600):
> On Wed, 14 Apr 2004, 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 perlreft
When I announced that I fixed a version of Perl6::Variables to do <<>>,
crickets chirped. I dislike having to place a lot of matching quotes,
brackets, parenthesis, and braces in my code. You must stop and
visually inspect code to make sure it balances out and even then is a
common source of bug c
Juerd wrote:
chromatic skribis 2004-04-14 12:32 (-0700):
That's exactly my objection to this idea. I think it goes too far to
make simple things simpler while making complex things impossible.
Absolutely false.
This is an addition to the already existing {}, which should stay.
%foo{ something
Scott Walters skribis 2004-04-14 13:12 (-0700):
> Second, autovivication is impossible for the same reason. We can't tell
> from parsing this lone expression whether baz should be converted to numbers
> or strings automatically.
I want ` for hashes in the first place. Having it for arrays too wou
On Wed, 2004-04-14 at 08:18, Juerd wrote:
> Perl 5 has the qx// operator which does readpipe. I believe the function
> for it was added later. (It doesn't handle a LIST as system does,
> unfortunately.) qx// is also known as ``. Two backticks.
>
> readpipe/qx/`` isn't used much. In all my @INC, on
Matthew Walton skribis 2004-04-14 21:23 (+0100):
> >%foo<<$bar>> doesn't quite do the same as %foo{$bar}.
> That's one method, really - <<>> being like {' '}, and really just
> carrying on the very familiar idea of different kinds of quotes. Like '
> and ".
The <<>> thing works as if there is an
> "Juerd" == Juerd <[EMAIL PROTECTED]> writes:
Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
Juerd> can be found. Most are in Debian's modules.
That's because they aren't particularly interesting in modules, but
in 10 line scripts, they show up quite frequentl
On Wed, Apr 14, 2004 at 01:56:35PM -0700, Randal L. Schwartz wrote:
That's because they aren't particularly interesting in modules, but
in 10 line scripts, they show up quite frequently.
This undermines the rest of your request.
No, actually, it doesn't. Juerd doesn't seem to like ``, but that poi
Randal L. Schwartz skribis 2004-04-14 13:56 (-0700):
> > "Juerd" == Juerd <[EMAIL PROTECTED]> writes:
> Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
> Juerd> can be found. Most are in Debian's modules.
> That's because they aren't particularly interesting in mo
[EMAIL PROTECTED] (Aaron Sherman) writes:
> $ find . -name \*.pl | wc -l
> 330
> $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | wc -l
> 123
>
> `` gets used an awful lot
But that's in Perl 5, which is a glue language.
--
"Though a program
On Wed, Apr 14, 2004 at 01:36:21PM -0600, John Williams wrote:
%hash`$key
oops, you contradicted yourself here. "only be useable for \w+ keys"
I guess you disliked his idea so much you didn't bother to read what exactly
he said, right?
"As with methods, a simple [...] scalar should be usable
> hash slices aren't used much at all.
People *always* overgeneralize.
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
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'} =
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
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
- 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
> >
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
"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
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
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
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
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.
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
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
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
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
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.
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
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
> -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&
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
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
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
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
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
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
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
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
> -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
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
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
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. (
> -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
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
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
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
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
> -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
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.
> -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.
> > >
> -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
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
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
>
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
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,
[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
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
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
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
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
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
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
[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
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
> -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
> -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
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 =
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
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
> -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
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
On Apr 16, 2004, at 10:14 AM, Juerd wrote:
Even with the "xx Inf"? Why?
Oh, right, missed that. Sorry.
David
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
1 - 100 of 119 matches
Mail list logo