Boost logo

Boost :

From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2003-12-03 10:27:40


On Wed, 3 Dec 2003, Howard Hinnant wrote:
> If I'm mistaken, and no one here would like to see dimension and rank
> in the std::tr1::type_traits lib, then please let me know that too. I
> /believe/ these would be useful. But I do not /know/ they would. If
> I'm mistaken, it wouldn't be the first time, and I might as well find
> out sooner than later. :-)

I'd rather not see them in TR1. Arrays don't play nice with the standard
library, and frankly I refuse to use them anywhere in application-level
code unless forced. TR1 has a real array class template, and it's my hope
that it will someday obsolete built-in arrays for the majority of
programmers. I've seen the mental mess built-in arrays cause for students:
"You mean, everything passed by value makes a copy, but arrays passed by
value is a reference? What do you mean it 'degrades' to a pointer---it
looks like an array!" Not to mention the inability to add bounds checking,
which any TR1 implementation could trivially add in debug mode and save us
lowly TAs lots of time when helping students debug...

So basically... I'd rather not add anything that encourages people to use
built-in arrays, especially now that we've given them a better option.

        Doug the Array-hater


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk