Jump to page: 1 28  
Page
Thread overview
DMD 0.165 release
Aug 21, 2006
Walter Bright
Aug 21, 2006
Derek Parnell
Aug 21, 2006
Tom S
Aug 21, 2006
Tom S
Aug 21, 2006
Niko Korhonen
Aug 21, 2006
Reiner Pope
Aug 21, 2006
Don Clugston
Aug 21, 2006
Walter Bright
Aug 21, 2006
Tony
Aug 21, 2006
Walter Bright
Aug 21, 2006
Niko Korhonen
Aug 21, 2006
Tom S
Aug 21, 2006
Walter Bright
Aug 21, 2006
Ivan Senji
Aug 21, 2006
Ivan Senji
[OT] Re: DMD 0.165 release
Aug 21, 2006
Tom S
Aug 21, 2006
Ivan Senji
Aug 21, 2006
Tom S
Aug 21, 2006
Walter Bright
Aug 21, 2006
Ivan Senji
Aug 21, 2006
Kristian
Aug 21, 2006
Walter Bright
Aug 21, 2006
Walter Bright
Aug 21, 2006
Sean Kelly
Aug 21, 2006
Walter Bright
Aug 21, 2006
Sean Kelly
Aug 21, 2006
Sean Kelly
Aug 21, 2006
Walter Bright
Aug 21, 2006
Sean Kelly
Aug 21, 2006
Walter Bright
Aug 21, 2006
Sean Kelly
Aug 21, 2006
Walter Bright
Aug 21, 2006
Frank Benoit
Aug 21, 2006
Walter Bright
Aug 21, 2006
Derek Parnell
Aug 21, 2006
Walter Bright
Aug 21, 2006
BCS
Aug 21, 2006
Walter Bright
Aug 21, 2006
BCS
Aug 21, 2006
Walter Bright
Aug 22, 2006
Bruno Medeiros
Aug 22, 2006
BCS
Aug 24, 2006
Bruno Medeiros
Aug 21, 2006
Derek Parnell
Aug 21, 2006
Walter Bright
Aug 21, 2006
BCS
Aug 22, 2006
Walter Bright
Aug 22, 2006
Sean Kelly
Aug 22, 2006
BCS
refined sugar (was DMD 0.165 release)
Aug 21, 2006
kris
Aug 21, 2006
Walter Bright
Aug 21, 2006
kris
Aug 22, 2006
BCS
Aug 22, 2006
Reiner Pope
Aug 22, 2006
Pragma
Aug 22, 2006
Lutger
Aug 23, 2006
Carlos Santander
Aug 23, 2006
Ivan Senji
Aug 23, 2006
Oskar Linde
Aug 23, 2006
Sai
Aug 22, 2006
Russ Lewis
Vote for func({expr}) over other ambiguous syntax
Aug 22, 2006
Sai
Aug 22, 2006
Lars Ivar Igesund
Aug 22, 2006
Walter Bright
Aug 23, 2006
Georg Wrede
Aug 22, 2006
Bruno Medeiros
August 21, 2006
I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.

http://www.digitalmars.com/d/changelog.html
August 21, 2006
On Sun, 20 Aug 2006 21:32:37 -0700, Walter Bright wrote:

> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
> 
> http://www.digitalmars.com/d/changelog.html

Wow! Neat ... but ...

So now you'll be working on getting the Docs synchronized with the compiler and adding the "missing" bits, right? Then RC1 can emerge?

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
21/08/2006 2:57:27 PM
August 21, 2006
Walter Bright wrote:
> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
> 
> http://www.digitalmars.com/d/changelog.html

Simply WOW !
I can't wait to use the feature. Btw, I think there is a bug in the Enforce example... IMO It should look more like in this test case:



import std.stdio;


class Spam {
	void ham() {
		writefln("ham() called !");
	}
}


T Enforce(T)(T delegate() p, char[] msg)
{
	writefln("entering Enforce()");
	auto res = p();
    if (!res)
	throw new Exception(msg);
    return res;
}


Spam foo(int a, int b) {
	writefln("entering foo()");
	if (a == b) return new Spam;
	else return null;
}


void main() {
	Enforce(foo(1, 1), "omigosh !").ham();
	Enforce(foo(1, 2), "omigosh !").ham();
}


--
Tomasz Stachowiak  /+ a.k.a. h3r3tic +/
August 21, 2006
Tom S wrote:
> Walter Bright wrote:
>> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
>>
>> http://www.digitalmars.com/d/changelog.html
> 
> Simply WOW !
> I can't wait to use the feature. Btw, I think there is a bug in the Enforce example... IMO It should look more like in this test case:
> 
> 
> 
> import std.stdio;
> 
> 
> class Spam {
>     void ham() {
>         writefln("ham() called !");
>     }
> }
> 
> 
> T Enforce(T)(T delegate() p, char[] msg)
> {
>     writefln("entering Enforce()");
>     auto res = p();
>     if (!res)
>     throw new Exception(msg);
>     return res;
> }
> 
> 
> Spam foo(int a, int b) {
>     writefln("entering foo()");
>     if (a == b) return new Spam;
>     else return null;
> }
> 
> 
> void main() {
>     Enforce(foo(1, 1), "omigosh !").ham();
>     Enforce(foo(1, 2), "omigosh !").ham();
> }

Ooops maybe I'm too sleepy. You probably meant Enforce to look like this:


T Enforce(T)(T p, char[] delegate() msg)
{
    if (!p)
	throw new Exception(msg());
    return p;
}


That would make more sense, as the message is lazily evaluated then...
August 21, 2006
Walter Bright wrote:
> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.

Whoa! Really, I'm speechless! I've been toying around with Haskell a lot recently and I really like this feature in D. Thanks, Walter!

-- 
Niko Korhonen
SW Developer
August 21, 2006
Walter Bright wrote:
> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
> 
> http://www.digitalmars.com/d/changelog.html

That's just great! Cool.
August 21, 2006
Walter Bright wrote:
> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
> 
> http://www.digitalmars.com/d/changelog.html

Awesome. Two observations:
* Together with lambda delegate type inference, it seems that delegates are becoming the central language idiom of D. It's not just an improved C++ any more, I think a whole new programming style is developing.
* Andrei's involvement in D seems to be increasing. Can we expect him to publish some D code soon?
August 21, 2006
The supplied example:

void foo()
{
    int v = 2;
    cond
    (
	scase(v == 1, writefln("it is 1")),
	scase(v == 2, writefln("it is 2")),
	scase(v == 3, writefln("it is 3")),
	scase(true,   writefln("it is the default"))
    );
}

Gives errors: 'voids have no value'. It works when writefln is changed to printf, as it returns an int... It would be cool if voids were also allowed to be lazy.


--
Tomasz Stachowiak
August 21, 2006
Don Clugston wrote:
> * Together with lambda delegate type inference, it seems that delegates are becoming the central language idiom of D. It's not just an improved C++ any more, I think a whole new programming style is developing.

Inner classes, nested functions, delegates, and closures are all closely related. The only thing missing in D is the full generality of closures; once we have that I think D can do what Lisp does, but with a much more palatable syntax.

> * Andrei's involvement in D seems to be increasing. Can we expect him to publish some D code soon?

Andrei is one of the few original thinkers in programming. With D he's been generous with his ideas and critiques, but he's pretty wrapped up with his university studies.
August 21, 2006
Hmmm... what does the last example about Enforce have to do with lazy evaluation?

It seems like a nice idea, etc., but I can actually run it already without upgrading to 0.165.....?

Does really sound nice, though :).

-[Unknown]


> I was going to call this 1.0 RC1, but I just could not resist adding the lazy expression evaluation. This adds one of the big capabilities of common lisp.
> 
> http://www.digitalmars.com/d/changelog.html
« First   ‹ Prev
1 2 3 4 5 6 7 8