Re: Shortcut: ?=

2003-02-02 Thread Joseph F. Ryan
Miko O'Sullivan wrote: SUMMARY C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. DETAILS We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy linguistic term for them) save us a few keystrokes and clean up the code. So, concerning C, I find myself doing this t

Re: Shortcut: ?=

2003-02-02 Thread Deborah Ariel Pickett
> SUMMARY > C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. > > > DETAILS > We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy > linguistic term for them) save us a few keystrokes and clean up the code. > > So, concerning C, I find myself doing this type of th

Re: Shortcut: ?=

2003-02-02 Thread Mr. Nobody
--- Miko O'Sullivan <[EMAIL PROTECTED]> wrote: > SUMMARY > > C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. > > > DETAILS > > We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy > linguistic term for them) save us a few keystrokes and clean up the code. > >

Shortcut: ?=

2003-02-02 Thread Miko O'Sullivan
SUMMARY C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. DETAILS We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy linguistic term for them) save us a few keystrokes and clean up the code. So, concerning C, I find myself doing this type of thing a lot:

Re: Arrays: is computed

2003-02-02 Thread Jim Cromie
[EMAIL PROTECTED] wrote: Shouldn't access to 'is computed' arrays be read-only? If you want to be able to consume the elements by shifting, you can always create a tied object that kees a cursor and a reference to the underlying array and gives you that access (and it could die for splicing, etc

Re: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-02-02 Thread Richard J Cox
On Thursday, January 30, 2003, 7:44:42 PM, you (mailto:[EMAIL PROTECTED]) wrote: > On Thu, 2003-01-30 at 13:13, Garrett Goebel wrote: > Let me switch that one around for you: > class MyContainer { > method index($object) { ... } # index by any scalar object > method ind

Re: summarizing the obvious (was: arrays, hashes unified ...)

2003-02-02 Thread Sam Vilain
On Sat, 01 Feb 2003 06:40, Garrett Goebel wrote: > Or for the extremely thick: > GOOD: Separate syntax for indexed vs. named lookups > BAD: Same syntax with >= 2 contextual meanings Or, another way to look at it; GOOD: flexible, re-usable code that doesn't care if you change the key type

Re: [RfD] parrot run loops

2003-02-02 Thread Leopold Toetsch
Jason Gloudon wrote: On Sun, Feb 02, 2003 at 12:46:50AM +0100, Leopold Toetsch wrote: #define IREG(i) interpreter->ctx.int_reg.registers[code_start[offs+i]] Where does the value of code_start coming from ? As stated in my first mail in this thread, code_start could be a auto variable in

RE: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-02-02 Thread John Williams
> > Because some things have both, and do different things with each. > > Ok $0 is special. But isn't it _the_ special case? And strictly speaking, > its an ordered associative array right? It doesn't really need the full > range of expression offered by $0{...} and $0[...]. All it needs is $0[1] >