home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!microsoft!hexnut!jimad
- From: jimad@microsoft.com (Jim Adcock)
- Subject: Re: Array anachronisms
- Message-ID: <1992Nov11.004038.17772@microsoft.com>
- Date: 11 Nov 92 00:40:38 GMT
- Organization: Microsoft Corporation
- References: <1992Nov6.190320.1@vax1.bham.ac.uk>
- Lines: 23
-
- In article <1992Nov6.190320.1@vax1.bham.ac.uk> mccauleyba@vax1.bham.ac.uk (Brian McCauley) writes:
- >Why must be live with the anachonistic restictions on the use of array
- >variables?
-
- I agree with your arguments, but some of the counterarguments are:
-
- 1) Its very confusing to have an array mean an array in one context,
- and have an array mean a ptr in another context [note however, that
- C++ *already* makes this distinction when passing an array by reference
- to array]
-
- 2) What you ask is already achievable with a slight change of syntax
- using templates:
-
- doBlah(array<int,5>)
- {
- ....
- }
-
- Since non-C-braindead-flavors of arrays can easily be implemented using
- templates, why invent a new slightly-less-braindead implementation of
- arrays built-in to C++? Instead, lobby the C++ libraries committee to
- put the arrays features you like into their proposed array class template.
-