RFC: naming for FrontTransversal and Transversal ranges

Robert Jacques sandford at jhu.edu
Fri May 1 10:48:09 PDT 2009

On Fri, 01 May 2009 06:45:20 -0400, Michel Fortin  
<michel.fortin at michelf.com> wrote:

> On 2009-04-30 20:52:05 -0400, Andrei Alexandrescu  
> <SeeWebsiteForEmail at erdani.org> said:
>>>> (Last but not least, .NET has arrays and slices. D's slices that  
>>>> actually have an array testis mesh real bad with .NET because in .NET  
>>>> you can't have a disowned slice.)
>>>  I've been following the blog. I was surprised that Cristian didn't  
>>> just make all D arrays .NET ArraySegments and be done with it, but  
>>> there's probably issues I don't know about. I'd like to hear more on  
>>> what exactly the issue was.
>>  We discussed at length. Without being an expert in .NET, I can't tell  
>> what the problem is, but I do know that if there was a simpler  
>> solution, Cristi would have probably found it.
> As I understand it, the issue is that the .NET API generally doesn't  
> expect ArraySegments, but Array, so Cristi wants T[] to be an array, not  
> an array segment, in order to make the API usable without having to  
> duplicate ArraySegments into Arrays every time. I'm doubtful having a  
> standard container type will help that much, as T[] (the slice) still  
> won't be accepted by the .NET API and the programmer would simply have  
> to always use the container.
> That the .NET framework wants to use containers everywhere instead of  
> slices is not a reason for D to bend to .NET concept of arrays and  
> slices.

I agree. D shouldn't go borrowing bad design from other languages.

More information about the Digitalmars-d mailing list