Am 27.01.2011 02:11, schrieb Jonathan M Davis: > On Wednesday, January 26, 2011 16:41:10 spir wrote: >> On 01/26/2011 11:33 PM, Trass3r wrote: >>>> For me, D's killer features were string handling (slicing and >>>> appending/concatenation) and *no header files*. (No more header files!! >>>> Yay!!!). But auto is fantastic too though, I get sooo much use out of >>>> that. >>> >>> Getting rid of the pointer crap (proper arrays, bounds checking, classes >>> as reference types,...) is definitely among the top 10 on my list. >> >> Same here. But I would prefere slicing not to check upper bound, rather >> just extend to the end. Or have a slicing variant do that. > > You mean that if you give an index which is too large, it just uses $ > instead? > That sounds seriously bug-prone to me. I'd much rather that it blew up and > thus > told me that my program had a bug in it rather than silently trying to work. > And > if for some reason you really want to be able to just have it use $ if the > index > is too large, it's easy to write a wrapper function which does that. > > - Jonathan M Davis
I think he wants int arr[] = int[3]; // ... int arr2[] = arr[1..5]; to be equivalent to int arr[] = int[3]; // ... int arr2[] = arr[1..$]; arr2.length = 4; Cheers, - Daniel
