Re: Any usable parsers for D2 around?

2010-10-26 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:ia8d66$1f7...@digitalmars.com... > "Andrej Mitrovic" wrote in message > news:i981a0$i6...@digitalmars.com... >> Hey, >> >> I've been looking for a D2 parser.. there seems to be a few D1 lexers, >> parsers, and even some minimal semantic analysis tools bu

Re: Any usable parsers for D2 around?

2010-10-26 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:i981a0$i6...@digitalmars.com... > Hey, > > I've been looking for a D2 parser.. there seems to be a few D1 lexers, > parsers, and even some minimal semantic analysis tools but I can't find > much of anything for D2. Perhaps Goldie will be D2 compatible som

Re: overloadable implicit cast

2010-10-26 Thread Jesse Phillips
Adam Cigánek Wrote: > Hello, > > Is it possible to make a type implicitly cast to another type? > Something like overloading opCast, but make it so it's used > implicitly. Or is there implicit casting in D at all? OpImplicitCast was planed to be added, but it has been superseded by alias this.

overloadable implicit cast

2010-10-26 Thread Adam Cigánek
Hello, Is it possible to make a type implicitly cast to another type? Something like overloading opCast, but make it so it's used implicitly. Or is there implicit casting in D at all? Pseudo-example: // hypothetical implicit cast: A opImplicitCast(T)(B b) if (is(T == A)) { // convert b t

Re: delete an element from an array

2010-10-26 Thread Michael Rynn
On Sun, 24 Oct 2010 13:02:24 +0200, Adam Cigánek wrote: > Hello, > > Is there a function in the standard library to delete an element from an > array (or range)? Something like: > > auto a = [1, 2, 3, 4, 5, 6]; > auto b = delete(a, 4); > > assert([1, 2, 3, 4, 6] == b); > > I've noticed t