.NET on a string

Kagamin spam at here.lot
Sun Mar 22 02:08:55 PDT 2009


Cristian Vlasceanu Wrote:

> I passed a proposal of my own to Walter and Andrei, and that is to have D 
> coders explicitly state the intent of using a slice with the "ref" keyword; 
> "ref" is already a legal token in D (at least in 2.0) albeit it is only 
> valid in the context of a parameter list, or foreach argument list. It is 
> not legal to say "ref int j = i;" in a declaration, for example. But it is a 
> trivial change in the parser (I have implemented this change as a proof of 
> concept / language extension research) to allow ref (just for slices): "ref 
> int[] s = a[1..2];" other than in parameter and foreach arg lists.

There was another suggestion - to mark arrays: int[] is a slice, int[new] is an array. I think, you'll have problems with const system, .net doesn't have one.



More information about the Digitalmars-d mailing list