June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | In article <e7832r$g4h$1@digitaldaemon.com>, Walter Bright says... > >Mostly bug fixes. > >http://www.digitalmars.com/d/changelog.html Once again, you rock. Thanks very much for this :) |
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Miller | Chris Miller wrote: > On Tue, 20 Jun 2006 02:03:08 -0400, Walter Bright <newshound@digitalmars.com> wrote: > >> Mostly bug fixes. >> >> http://www.digitalmars.com/d/changelog.html > > > > Wow, that new literal delegate syntax is crazy but I like it. > [...] Ohhhh fun!! Try finding the bug in this one (ignore the hints). <code> #import std.stdio; #void main() #{ # writef(fn,\n); #} # #int fn() #{ # int baz() # { # return 6; # } # # void figNewton( int i, int delegate()fnp=&baz, int k=3, int l=0) # { # } # int w; # # figNewton(9,//); # { # return 1; # },//; # w = (1+3),//; # doNothing/*(*/); # # return 2; #} #int doNothing(){return 1;} </code> Yah, yah thats about a contrived a C-list movie but... |
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | David Medlock wrote: > Walter Bright wrote: >> Mostly bug fixes. >> >> http://www.digitalmars.com/d/changelog.html > > New delegate syntax looks great, can't wait to try it! Excellent. It's good to see that Walter likes many of the good features in Ruby. Some Java/C++ -fanboys might say that they're pure syntactic sugar, but trust me - they have lost their sanity long time ago ;) -- Jari-Matti |
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound@digitalmars.com> wrote in message news:e7832r$g4h$1@digitaldaemon.com... > Mostly bug fixes. > > http://www.digitalmars.com/d/changelog.html Oh man, those delegate literals look like it would be very possible to make interesting "pseudo-structures," that is, fake language constructs. So if you were to define a function as void func(void delegate() dg); That is, the last parameter is a void delegate(), it would be an interesting bit of syntactic sugar to be able to write func { writefln("foo"); } Not sure what utility this would present, but hey! |
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jari-Matti Mäkelä | Jari-Matti Mäkelä wrote:
> David Medlock wrote:
>
>> Walter Bright wrote:
>>> Mostly bug fixes.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>> New delegate syntax looks great, can't wait to try it!
>
> Excellent. It's good to see that Walter likes many of the good features in
> Ruby. Some Java/C++ -fanboys might say that they're pure syntactic sugar,
> but trust me - they have lost their sanity long time ago ;)
It's possible to go too far with conciseness (APL and Perl show that!), but in general being able to write what you mean with a minimum of fuss makes for a more productive language.
|
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> "Walter Bright" <newshound@digitalmars.com> wrote in message news:e7832r$g4h$1@digitaldaemon.com...
>> Mostly bug fixes.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> Oh man, those delegate literals look like it would be very possible to make interesting "pseudo-structures," that is, fake language constructs. So if you were to define a function as
>
> void func(void delegate() dg);
>
> That is, the last parameter is a void delegate(), it would be an interesting bit of syntactic sugar to be able to write
>
> func
> {
> writefln("foo");
> }
>
> Not sure what utility this would present, but hey!
There was some thought about doing that, but I'm not so sure it wouldn't be more confusing than useful.
|
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | Bruno Medeiros wrote:
> Walter Bright wrote:
>> Mostly bug fixes.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> Great update, lots of bugfixes, and the shorter delegate syntax looks awesome!
>
> It says "Fixed Bugzilla 53 according to Bruno's analysis" but I don't know anything about bug 53. Did you meant Oskar, or perhaps bug 47?
It wasn't 53, but I can't remember which one it was!
|
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Bruno Medeiros wrote:
>> Walter Bright wrote:
>>> Mostly bug fixes.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>>
>> Great update, lots of bugfixes, and the shorter delegate syntax looks awesome!
>>
>> It says "Fixed Bugzilla 53 according to Bruno's analysis" but I don't know anything about bug 53. Did you meant Oskar, or perhaps bug 47?
>
> It wasn't 53, but I can't remember which one it was!
Ah, it was #51.
|
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon wrote: > Walter Bright wrote: >> Mostly bug fixes. >> >> http://www.digitalmars.com/d/changelog.html > > "Shadowing local variable declarations is now deprecated." > > I thought it had always been illegal by the spec. It wasn't implemented. > "Folded in D.bugs/7509" > > You seem to have slipped up here: > > "What's needed is an error handling philosophy and methodology such that: > [...] > * 'Quick and dirty' utilities to be written that still correctly handle errors." > > s/to/can Thanks, I'll fix. > > "Fixed Bugzilla 57 in 0.151" > > Why is this in the changelog for 0.161? It was overlooked. > "Fixed Bugzilla 36 (better error message)" > "Fixed Bugzilla 85 (now issues error message)" > > And they're also marked as fixed in Bugzilla. However, at the moment I can't seem to find the bit of the spec that indicates that either is illegal code. 36: forward references are an ongoing issue, I'd like to get rid of all such errors. But in the meantime, having feet of clay, some will give error messages instead. 85: It can't be made to work, because an interface handle is different from a class handle. It doesn't work in C++, either, for the same reasons. |
June 20, 2006 Re: DMD 0.161 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Stewart Gordon wrote:
>>
>> "Fixed Bugzilla 85 (now issues error message)"
>>
>
> 85: It can't be made to work, because an interface handle is different from a class handle. It doesn't work in C++, either, for the same reasons.
Anyway to get a cast? (If it is already there...)
Somthing like:
interface I{...}
class C : I {...}
...
C[] c;
I[] i;
c = ....;
i = cast(I)c;
// same as
i.length = c.length;
foreach(int j, C e; c)
i[j] = (null !is e)?e:null;
|
Copyright © 1999-2021 by the D Language Foundation