On 9/20/13 9:46 AM, Szymon Gatner wrote:
On Friday, 20 September 2013 at 16:38:29 UTC, Andrei Alexandrescu wrote:
On 9/20/13 8:13 AM, Joseph Rushton Wakeling wrote:
On 20/09/13 16:48, H. S. Teoh wrote:
A container should not be confused with a range. That way leads to
dragons. :-P  (It's rather unfortunate that built-in arrays conflate
the
two, it leads to a lot of wrong code that works only with arrays but
not
with "real" ranges.)

Built-in arrays are not _always_ ranges.  Consider const(int[]) ... as I
found out recently, it's _not_ a range, because you can't popFront on a
const entity.


Well you can't call popFront on any const range.


What is even the purpose of const ranges? It makes little sense imho.

I'd agree. As an aside, they don't have to make sense.

Andrei

Reply via email to