From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f43e6,899fc98b2883af4a X-Google-Attributes: gidf43e6,public X-Google-Thread: 11232c,59ec73856b699922 X-Google-Attributes: gid11232c,public X-Google-Thread: fdb77,5f529c91be2ac930 X-Google-Attributes: gidfdb77,public X-Google-Thread: 1108a1,59ec73856b699922 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-22 22:20:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Newsgroups: comp.lang.java.advocacy,comp.object,comp.lang.ada,misc.misc,comp.software-eng From: The Ghost In The Machine Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) References: <9fa75d42.0304230424.10612b1a@posting.google.com> <9fa75d42.0305091549.48b9c5d9@posting.google.com> <7507f79d.0305121629.5b8b7369@posting.google.com> <9fa75d42.0305130543.60381450@posting.google.com> <254c16a.0305140549.3a87281b@posting.google.com> <9fa75d42.0305141747.5680c577@posting.google.com> <254c16a.0305160425.3bb89749@posting.google.com> <1053091306.979352@master.nyc.kbcfp.com> <7vaddj8k3d.fsf@vlinux.voxelvision.no> <7v65o78gtv.fsf@vlinux.voxelvision.no> <5ddnp-a63.ln1@lexi2.athghost7038suus.net> <1053436685.260636@master.nyc.kbcfp.com> <1053526931.61358@master.nyc.kbcfp.com> X-face: "i;@/WO(?;[KC9sW;wG/4@H[_VFFH4?QHJ#O(?m}7fQMrJ,]0THA'\|e-EPG_>56Mi}_RRhBS'a2}u_7jm)0_+'=$V#E2r4#IQE/d)yMv3_4@hl<)mA&*tDN/ User-Agent: slrn/0.9.7.4 (Linux) Message-ID: Date: Fri, 23 May 2003 05:18:37 GMT NNTP-Posting-Host: 165.121.171.75 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1053667117 165.121.171.75 (Thu, 22 May 2003 22:18:37 PDT) NNTP-Posting-Date: Thu, 22 May 2003 22:18:37 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.java.advocacy:64427 comp.object:63887 comp.lang.ada:37667 misc.misc:14363 comp.software-eng:19353 Date: 2003-05-23T05:18:37+00:00 List-Id: In comp.lang.java.advocacy, Hyman Rosen wrote on Wed, 21 May 2003 10:22:10 -0400 <1053526931.61358@master.nyc.kbcfp.com>: > The Ghost In The Machine wrote: >> The problem is that if one defines >> #define begin(a) (a) >> #define end(a) ((a) + sizeof(a)/sizeof((a)[0])) > > You really did miss my other post, didn't you? :-) > template T *begin(T (&a)[N]) { return a; } > template T *end (T (&a)[N]) { return a + N; } > Using array references prevents the decay to pointer and > allows both the array size and type to be deduced. > Oops. You're absolutely right! I'll admit, though, that I'm not entirely sure what the function calls (as opposed to the function defs above) would look like. Probably begin(a) end(a) which isn't very pretty looking either. However, it turns out, strangely enough, that int a[10]; begin(a) end(a) actually does in fact work on g++, so hopefully you'll forgive me. :-) It's certainly an interesting capability. (What do these look like in C#?) -- #191, ewill3@earthlink.net It's still legal to go .sigless.