Re: Lvaluability

2001-04-27 Thread Graham Barr
On Sat, Apr 28, 2001 at 03:11:08AM +0100, Simon Cozens wrote: > substr($foo, 1, 3) = "hi!"; # We all know this. > splice(@foo, 1, 3) = @bar; # But the lack of this seems asymmetric An originally we had splice(@foo, 1, 3, @bar); but not substr($foo, 1, 3, "hi!"); which are more useful, IM

Lvaluability

2001-04-27 Thread Simon Cozens
substr($foo, 1, 3) = "hi!"; # We all know this. splice(@foo, 1, 3) = @bar; # But the lack of this seems asymmetric $baz = $foo.bar;# Surely this is just overloaded "." being a # subroutine in $foo's package called with a # barew

Re: a modest proposal Re: s/./~/g

2001-04-27 Thread Simon Cozens
On Fri, Apr 27, 2001 at 03:22:12PM -0500, David L. Nicol wrote: > Will there be confusion with the _ that means "the file statted by > the last -X test?" I doubt it: file tests need to bind tighter than > the concat op and the problem is over. Hey, that would make "_ _ __" legal Perl code. Abiga

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Larry Wall
Dan Sugalski writes: : Besides, having the site administrator forbid the installation of parser : tweaks might not be what is wanted. If we get PPython in there, a site may : well have a Python.pm module handy, and source might start: : :use site_policy qw(Python); : : for modules that wer

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Dan Sugalski
At 01:16 PM 4/27/2001 -0700, Larry Wall wrote: >Dan Sugalski writes: >: It's also the one reason that I really like the idea of policy files of >: some sort, to allow sites that don't want this sort of thing to forbid it. >: I'm not talking things like perl automagically loading policy files in. >

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Larry Wall
John Porter writes: : Larry Wall wrote: : > On the other hand, people don't generally declare which dialect they're : > going to speak in before they start speaking. : : On the other other hand, perl already embraces the philosophy : of pre-declaring things that change the language. That's wha

Re: a modest proposal Re: s/./~/g

2001-04-27 Thread David L. Nicol
Jonathan Scott Duff wrote: > > I'd rather it be "cc" or "_" (I didn't like the underscore at first, > but it's grown on me a little) Comparing ~ and _ to available editors markup marks, _ is closer to the sideways () that an editor might use to indicate that two words should be joined together.

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread John Porter
Larry Wall wrote: > On the other hand, people don't generally declare which dialect they're > going to speak in before they start speaking. On the other other hand, perl already embraces the philosophy of pre-declaring things that change the language. That's what a pragma is. Even "my" could

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Larry Wall
Dan Sugalski writes: : It's also the one reason that I really like the idea of policy files of : some sort, to allow sites that don't want this sort of thing to forbid it. : I'm not talking things like perl automagically loading policy files in. : Rather having "use site_policy;" set limits tha

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Dan Sugalski
At 09:16 AM 4/27/2001 -0400, Eric Roode wrote: >Larry Wall wrote: > >[wrt multiple syntaxes for Perl 6] > > > >In any event, I'm not worried about it, as long as people predeclare > >exactly which variant they're using. And I'm also not worried that > >we'll have any lack of style police trying t

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Dan Sugalski
At 04:19 PM 4/26/2001 -0700, Larry Wall wrote: >Dan Sugalski writes: >: And on the other hand you have things like Forth where every program >: essentially defines its own variant of the language, and that works out >: reasonably well. (Granted it's more of a niche language, especially today, >: b

Re: a modest proposal Re: s/./~/g

2001-04-27 Thread Jonathan Scott Duff
On Fri, Apr 27, 2001 at 01:45:02AM -0700, Damien Neil wrote: > I think many of us are resigned to losing . for concatination; I know > I can live with that. I just don't want to have this result in ~, ^, > or any other C-style punctuation operator getting renamed. That's my position. I'd rath

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Eric Roode
Larry Wall wrote: [wrt multiple syntaxes for Perl 6] > >In any event, I'm not worried about it, as long as people predeclare >exactly which variant they're using. And I'm also not worried that >we'll have any lack of style police trying to enforce Standard Perl 6. > >Larry As a member of a con

Re: Curious: -> vs .

2001-04-27 Thread Buddha Buck
Piers Cawley <[EMAIL PROTECTED]> writes: > Buddha Buck <[EMAIL PROTECTED]> writes: > > > Piers Cawley <[EMAIL PROTECTED]> writes: > > > > > Buddha Buck <[EMAIL PROTECTED]> writes: > > > > > > > > How about borrowing from Objective C? > > > > > > > >[$object method("foo", "bar")]; > >

Re: Curious: -> vs .

2001-04-27 Thread Buddha Buck
Bart Lateur <[EMAIL PROTECTED]> writes: > On 26 Apr 2001 23:19:49 -0400, Buddha Buck wrote: > > >$bar = [$obj method() ]; # method call > > $bar = method $obj() > > would be more consistent with perl's current > > $object = new Class() > > syntax. Yes, well, some people wa

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Nicholas Clark
On Thu, Apr 26, 2001 at 11:04:33PM -0500, Jarkko Hietaniemi wrote: > On Fri, Apr 27, 2001 at 02:28:58AM +0100, Simon Cozens wrote: > > On Thu, Apr 26, 2001 at 06:25:03PM -0500, Jarkko Hietaniemi wrote: > > > In a sick way I kinda liked how compilers were able to give out error > > > messages not u

Re: a modest proposal Re: s/./~/g

2001-04-27 Thread Damien Neil
On Thu, Apr 26, 2001 at 04:46:48PM -0700, Larry Wall wrote: > And I'm tired of hearing the argument that Perl programmers can't get > used to a different operator for concatenation. I know better--after > all, Perl is probably what got them used to . in the first place. If > you can teach dogs t

Re: Curious: -> vs .

2001-04-27 Thread Bart Lateur
On 26 Apr 2001 23:19:49 -0400, Buddha Buck wrote: >$bar = [$obj method() ]; # method call $bar = method $obj() would be more consistent with perl's current $object = new Class() syntax. -- Bart.