home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!caen!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!hardy.u.washington.edu!rons
- From: rons@hardy.u.washington.edu (Ronald Schoenberg)
- Newsgroups: comp.lang.c++
- Subject: Re: Proposal: Subscripting with multiple arguments
- Message-ID: <1992Sep15.031111.15170@u.washington.edu>
- Date: 15 Sep 92 03:11:11 GMT
- References: <1992Sep14.182942.1986@athena.mit.edu> <MATT.92Sep14161955@physics.berkeley.edu>
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington, Seattle
- Lines: 24
-
- In article <MATT.92Sep14161955@physics.berkeley.edu> matt@physics.berkeley.edu writes:
- [..elided material...]
- >
- >What I find to be a bigger problem, actually, is designing an array
- >class that works for arrays with an arbitrary number of dimensions.
- >There's no problem with defining the classes Array1, Array2,
- >Array3,..., and that's exactly what I've done, but it's annoying and
- >inelegant. Has anyone out there come up with a good definition for
- >arrays with an arbitrary number of dimensions? ("Good," in this
- >context, means specifically that array reference is sufficiently well
- >optimized that an intelligent programmer wouldn't mind using this
- >class in an inner loop.)
- >--
- >Matthew Austern Just keep yelling until you attract a
- >(510) 644-2618 crowd, then a constituency, a movement, a
- >austern@lbl.bitnet faction, an army! If you don't have any
- >matt@physics.berkeley.edu solutions, become a part of the problem!
-
- M++ has four dimensional arrays that can be generalized to any number
- of dimensions with minor changes in source code. It, however, overloads
- operator() rather than operator[]. I am new to C/C++ and I am used to
- using parens so I'm happy - I find typing [1][2][3] a lot harder than
- (1,2,3). I've been told by the designer of M++ that overloading
- operator[] creates too many problems.
-