🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #654

Re: Array anachronisms

#654
From: Jim Adcock
Date: Wed, 11 Nov 1992 00:40
23 lines
1230 bytes
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.
Technical Details
Message-ID: <1992Nov11.004038.17772@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!jimad
References: <1992Nov6.190320.1@vax1.bham.ac.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!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