$foo[0][0] versus $foo[0;0]

Hi,

I'm reviewing the tests in S09, and the file 
t/spec/S02-builtin_data_types/multi_dimensional_array.t uses the [0][0]  
indexing format interchangeably with [0;0].

These two formats mean two different things, correct? The [0][0] form isn't 
mentioned much in the spec, nor is [0;0] or if they interact somehow.

Thanks,
-- 
Adrian Kreher
0
ak10864
7/13/2008 7:17:10 PM
perl.perl6.language 6843 articles. 0 followers. Follow

2 Replies
1002 Views

Similar Articles

[PageSpeed] 33
Get it on Google Play
Get it on Apple App Store

On Sun, Jul 13, 2008 at 02:17:10PM -0500, Adrian Kreher wrote:
: Hi,
: 
: I'm reviewing the tests in S09, and the file 
: t/spec/S02-builtin_data_types/multi_dimensional_array.t uses the [0][0]  
: indexing format interchangeably with [0;0].
: 
: These two formats mean two different things, correct? The [0][0] form isn't 
: mentioned much in the spec, nor is [0;0] or if they interact somehow.

I think they should come out to meaning the same thing, though the
[0][0] form may be less efficient if it has to temporarily construct
a slice of the next dimension of the array.  On the other hand, a
na�ve implementation of the multidimensional subscripter might just do
the same thing internally for the semicolon, so it could be a wash.

Larry
0
larry
7/16/2008 5:04:03 PM
On Wed, Jul 16, 2008 at 10:04:03AM -0700, Larry Wall wrote:
> On Sun, Jul 13, 2008 at 02:17:10PM -0500, Adrian Kreher wrote:
> : Hi,
> : 
> : I'm reviewing the tests in S09, and the file 
> : t/spec/S02-builtin_data_types/multi_dimensional_array.t uses the [0][0]  
> : indexing format interchangeably with [0;0].
> : 
> : These two formats mean two different things, correct? The [0][0] form isn't 
> : mentioned much in the spec, nor is [0;0] or if they interact somehow.
> 
> I think they should come out to meaning the same thing, though the
> [0][0] form may be less efficient if it has to temporarily construct
> a slice of the next dimension of the array.  On the other hand, a
> na�ve implementation of the multidimensional subscripter might just do
> the same thing internally for the semicolon, so it could be a wash.

Would it be counter-productive to specify that the implementation is allowed
to compile time optimise [$a][$b] etc to [$a;$b] etc?

I'm assuming that it is allowed for the implementation of a multidmentional
array to have different semantics for [$a][$b] and [$a;$b], but that seems
to violate good sense, much like overloading a class in Perl 5 (or any other
language) such that (++$a) and ($a + 1) are not the same.

Nicholas Clark
0
nick
7/17/2008 3:00:32 PM
Reply:

Similar Artilces:

0.0.0.0 ????
Obviously a local IP, but what are its functions/purpose? Thanks for educating the uneducated. In article <MPG.18bf7ade16e851cb989680@news.grc.com>, shr@p.com says... > > > Obviously a local IP, but what are its functions/purpose? > > Thanks for educating the uneducated. > Any available adapter - i.e. not bound to specific IP address. -- Bloated Elvis In article <MPG.18bf7ade16e851cb989680@news.grc.com>, shr@p.com says... > > > Obviously a local IP, but what are its functions/purpose? > > Thanks for educating the une...

0.0.0.0
Can someone tell me the function of this scan? FWIN,2001/08/28,20:06:43 -6:00 GMT,0.0.0.0:800,255.255.255.255:800,UDP "Ben" <notben@home.com> wrote in message news:9mhion$2hf9$1@news.grc.com... > Can someone tell me the function of this scan? > FWIN,2001/08/28,20:06:43 -6:00 GMT,0.0.0.0:800,255.255.255.255:800,UDP Ben, I haven't a clue. 800 TCP mdbs_daemon 800 UDP mdbs_daemon http://www.robertgraham.com/pubs/firewall-seen.html http://www.robertgraham.com/pubs/firewall-seen.html#3.6 http://www.robertgraham.com/pubs/firewall-seen.html#3.2 -- ...

63.0.0.0.0/255..0.0.0
Has anyone ever heard of this or know where it goes to.It was asking permission to act as a server? Thanks in advance for any help. "pb" <nothing@nomail.com> wrote in message news:9pa1u4$38b$1@news.grc.com... > Has anyone ever heard of this or know where it goes to.It was asking > permission to act as a server? Thanks in advance for any help. If it shows in your firewall log, can you post a copy of it? -- � -- Robert grc.com forum FAQ - http://grc.com/discussions.htm grc.com forum quick reference - http://grc.com/nntpquickref.htm grc.com forum disclaim...

IP Address 0.0.0.0.0
Some Agent which crosses proxy (MS ISA proxy) are register to the database with 0.0.0.0. When the agent send a request to the server for register, the field ContactAddress has 0.0.0.0 .0 The same PC - Agent without passing a proxy (another location) send a good ContactAdress IP when it register to the server. (Proxy or not) how agent defined addresses IP before to send for registration ? (Locally, with a service network, patchlink network) christian Astinx, can you post the agent update log? -- Shaun Pond PatchLink Update Agent.log 2006/10/23 10:45:14.033...

!27.0.0.1 vs. 0.0.0.0
I can use any number of tools to see what ports I have listening and/or connected. But among the *Listening* ports, some are 127.0.0.1 and some are 0.0.0.0. What is the difference between 127.0.0.1 and 0.0.0.0 ? Since I've got both - there MUST be a difference. Thanks, Alan 0.0.0.0 stands for all interfaces (example: yourIPaddress,127.0.0.1-127.254.254.254) 127.0.0.1 stands for local interface only (127.0.0.1) > 0.0.0.0 stands for all interfaces > (example: yourIPaddress,127.0.0.1-127.254.254.254) > > 127.0.0.1 stands for local interface only (127....

0.0.0.0 IP ADRESS
Hi !I cant understanding. why the my pc documets using 0.0.0.0 ip adress out for internet ? expecially inetsvc.exe and I got active ports program. I see that, the some of the xp (server 2003) documents using 0.0.0.0 ip adress... is there anyone for help this subject. ? and our server (they have dedicated server) no giving us any information about their company. anyone can be know that why ? and I checked my pc with netstat - r ! its seem so different information that my adsl information...thanksARKIN Explain your problem better please, would love to help you on this subject.Bryan Samp...

IP address 0.0.0.0
I am curious to find out entries in my router log (Linksys) which have LAN IP of 0.0.0.0 and destination URL/IP of �. Does nayone know what it means? Is this any hacker activity? Sam <nspam@nospam.net> wrote: > I am curious to find out entries in my router log (Linksys) which > have LAN IP of 0.0.0.0 and destination URL/IP of �. Does nayone know > what it means? Is this any hacker activity? http://www.geocities.com/merijn_bellekom/new/netstatan.html -- Robert GRC newsgroup tips - http://www.imilly.com/noregrets.htm List of Lists - http://lists.gpick.com/ Privac...

[ 0.0.3461.0 ]
Gang... Quick fix of increasing the Add/Remove dialog's inter-button spacing to see whether that cures the effect Robin and others found when using the Classic Windows theme. Did that fix it??? <g> -- ________________________________________________________________ Steve. Working on: GRC's DNS Benchmark utility: http://www.grc.com/dev/DNSBench.exe [for the unabridged version, see Steve Gibson post above] > Did that fix it??? <g> That appears to have done the trick. And the increased spacing makes the result look much nice under the ...

[ 0.0.3460.0 ]
Gang... I decided to put up today's first build since it incorporates Sparky's really perfect improvement to the Add/Remove dialog. :) -- ________________________________________________________________ Steve. Working on: GRC's DNS Benchmark utility: http://www.grc.com/dev/DNSBench.exe Steve Gibson wrote: > Gang... > > I decided to put up today's first build since it incorporates > Sparky's really perfect improvement to the Add/Remove dialog. > > :) > I had already worked out a bunch of tests and I've found a ...

[PATCH] When is 0 + 0 != 0
A non-existing buffer + a non-existing buffer should be a non-existing buffer, not "", which is really '\0'. Index: string.c =================================================================== RCS file: /home/perlcvs/parrot/string.c,v retrieving revision 1.50 diff -u -r1.50 string.c --- string.c 28 Feb 2002 18:26:07 -0000 1.50 +++ string.c 1 Mar 2002 05:22:54 -0000 @@ -267,7 +265,7 @@ return string_copy(interpreter, b); } else { - return string_make(interpreter, "", 0, NULL, 0, NU...

Set DateTime to nothing or 0 0 0 0 0 how? C#
How can I set this DateTime to nothing or zero hours, zero minutes, 0 seconds  DateTime tempOrgDate   Regards,-- "Mark As Answer" if my reply helped you --  By default a new DateTime starts out at {01/01/0001 00:00:00} This is taken from MinValue = {01/01/0001 00:00:00} You cant set it any lower than that. Attempts to will generate a compiler error. The alternative is to declare it as null like:DateTime tempOrgDate = null;   sukumarraju:How can I set this DateTime to nothing or zero hours, zero minutes, 0 seconds &nbs...

0.0.
Name: lethanhnguyen1990@gmail.com Email: lethanhnguyen1990atgmaildotcom Product: Firefox Summary: 0.0. Comments: good Browser Details: Mozilla/5.0 (Windows NT 5.1; rv:2.0b9pre) Gecko/20110107 Firefox/4.0b9pre From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

2.0.0.9 versus 2.0.0.16
Name: Danny Eaton Email: dannyeatonatricedotedu Product: Firefox Summary: 2.0.0.9 versus 2.0.0.16 Comments: When I am running v 2.0.0.9, I have no problems. When Firefox AUTOMATICALLY UPGRADES to 2.0.0.16 (without having asked me if I want to), I have problems with Flash (on my wireless control server), and JAVA. I then have to uninstall flash, java, and Firefox 2.0.0.16, then reinstall 2.0.0.9, then flash and java. Huge pain in the ass. Why can't it just ask me if I want to upgrade, and if I say no, leave me alone? The problem only happens on this laptop, and 2.0.0...

Cluster resource IP of 0.0.0.0
Was inspecting our cluster configuration through remote manager on both of our cluster nodes. Under Clustering/Clustering Config in RM, clicking on the resources shows IP address,AFP,CIFS,etc. All my other resources have a correct IP address assigned to it, however one has 0.0.0.0. We have an IP address certainly assigned to it, but seemed to have lost it I suppose. What process should I go through before/after specifying the IP address, and where else should I be looking to see if something else is screwy somewhere. Thank you in advance. Cheers, CB The best process is...

Web resources about - $foo[0][0] versus $foo[0;0] - perl.perl6.language

random($foo): Blueball-o-rama
leonard lin's weblog. topical geek news.

Blog posts in Announcements - Twitter Developers
Skip to Main Content Area June 11, 2013 Having trouble with your app? API v1 is retired and no longer functional. - Read more → Developers API ...

Dereference operator - Wikipedia, the free encyclopedia
The dereference operator or indirection operator , denoted by " * " (i.e. an asterisk ), is a unary operator found in C -like languages that ...

Greetings and salutations (and anomie)
I've started this blog as a place to collect my thoughts on user-centred ontologies, ethnoclassification, folksonomies, emergent semantics and ...

Someone Comes to Town, Someone Leaves Town » Download for Free
On this page, you will find downloadable full-text versions of my book in open formats that contain no DRM (a stupid, scientifically bankrupt ...

Debugging and profiling in PHP
In this article I'm going to show you some techniques I use to debug and profile PHP code.

[PHP] $foo->short('getSlug', [ ['trim', $param1], ['str_replace','_',$this-> - Pastebin.com
PASTEBIN - #1 paste tool since 2002 create new paste tools api archive faq PASTEBIN create new paste trending pastes sign up login my alerts ...

Lessons Learned - Product Beautiful: Building Product Management by Paul Young
H P Home About Published Writing Other Resources Archives Archive for Lessons Learned September 3, 2012 What Product Managers can Learn from ...

W3C Hammers Out the Details of CSS Variables
... variable. When variables were first proposed many assumed the syntax would look something like SASS or LESS, roughly like this: $foo = myvalue; ...

WikiLeaks Attacks Reveal Surprising, Avoidable Vulnerabilities
Some online service providers are in the cross hairs this week for allegedly abandoning WikiLeaks after it published secret U.S. diplomatic ... ...

Resources last updated: 12/3/2015 3:20:01 AM