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 with you, Mark.
>
> > A) Do you code hashin
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
On Thu, 2004-04-15 at 18:23, Austin Hastings wrote:
> > @matrix... = <<1 0 0 1>>;
> Keep in mind that you're using a quoting operator. For numbers, you can just
> use (0, 1, 2, 3)
> and probably be better understood. (The <> approach will
> work, but it will take all the numbers through a str
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
On Fri, 16 Apr 2004, Aaron Sherman wrote:
> > > @matrix... = <<1 0 0 1>>;
>
> In the case of:
>
> @matrix = <<1 2 3 4 5>>;
>
> You need only add the type:
>
> int @matrix = <<1 2 3 4 5>>;
> There is no string phase, or at least should never be.
> The compiler can
> pre-compute the
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
Perl.com has just made A12 available:
http://www.perl.com/pub/a/2004/04/16/a12.html
Warning -- 20 pages, the first of which is a table of contents.
Enjoy,
-- c
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
39 matches
Mail list logo