February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sat, 25 Feb 2006 18:06:36 -0800, Walter Bright wrote: > Scope guards are a novel feature no other language has. They're based on Andrei Alexandrescu's scope guard macros, which have led to considerable interest in the idea. Check out the article www.digitalmars.com/d/exception-safe.html Thanks Walter very cool. I like kyle's suggestion on using. onExit, onFailure, onSuccess so that it looks a little like javascript. Walter have you considered like publishing new releases on http://freshmeat.net ?? Like GDC and DStress do ?? Freshmeat is the slashdot equivalent for software. Knud |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Sørensen | Knud Sørensen wrote:
> Freshmeat is the slashdot equivalent for software.
Forgive my ignorance, but what is slashdot?
|
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to bobef | On Sun, 26 Feb 2006 19:41:14 +1100, bobef <bobef@lessequal.com> wrote: > Knud Sørensen wrote: > >> Freshmeat is the slashdot equivalent for software. > > Forgive my ignorance, but what is slashdot? It's the equvalent of FreshMeat for I.T. related news and gosip. -- Derek Parnell Melbourne, Australia |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote: > On Sun, 26 Feb 2006 19:41:14 +1100, bobef <bobef@lessequal.com> wrote: > >> Knud Sørensen wrote: >> >>> Freshmeat is the slashdot equivalent for software. >> >> >> Forgive my ignorance, but what is slashdot? > > > It's the equvalent of FreshMeat for I.T. related news and gosip. > That's a nice, circular definition. =P What's a square? Well, it's like a rectangle but with even sides. What's a rectangle? Well, it's like a square but only opposite side pairs need to be the same length. -- Regards, James Dunne |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to bobef | On Sun, 26 Feb 2006 10:41:14 +0200, bobef wrote: > Knud Sørensen wrote: > >> Freshmeat is the slashdot equivalent for software. > > Forgive my ignorance, but what is slashdot? http://slashdot.org |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to bobef Attachments: | bobef schrieb am 2006-02-26: > Knud Sørensen wrote: > >> Freshmeat is the slashdot equivalent for software. > > Forgive my ignorance, but what is slashdot? http://slashdot.org Thomas |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kyle Furlong | In article <dtri4j$ejs$1@digitaldaemon.com>, Kyle Furlong says... > >I thought the same, perhaps the "scope" portion is understood? So that the keywords become: onsuccess, onfailure, ...? Personally I think it's better not to overuse simple words and phrases as keywords. onsuccess/onSuccess etc. are a bit too likely to be chosen as a function name, especially since these are not common keywords in other languages. Nick |
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | Nick wrote:
> In article <dtri4j$ejs$1@digitaldaemon.com>, Kyle Furlong says...
>> I thought the same, perhaps the "scope" portion is understood? So that the
>> keywords become: onsuccess, onfailure, ...?
>
> Personally I think it's better not to overuse simple words and phrases as
> keywords. onsuccess/onSuccess etc. are a bit too likely to be chosen as a
> function name, especially since these are not common keywords in other
> languages.
>
> Nick
>
>
I have to agree with this. The "scope" prefix, however unsightly, serves its purpose here. Yet I wonder if there is a way to improve upon that syntax.
-JJR
|
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kyle Furlong |
Yes I agree with Kyle but not to overuse simple keywords, what about something like "onSuccess:", "onFailure:", etc...
To me all "_" look ugly. Perhaps the author could ask the community for suggestions when naming new features?
Or perhaps just "onScopeSuccess", "onScopeFailure"...
Kyle Furlong wrote:
> John Reimer wrote:
>> Walter Bright wrote:
>>> Scope guards are a novel feature no other language has. They're based on Andrei Alexandrescu's scope guard macros, which have led to considerable interest in the idea. Check out the article www.digitalmars.com/d/exception-safe.html
>>>
>>>
>>
>>
>> Nice feature, but rather ugly to look at; although, I'm not sure how something like that could be made to look pretty. Nonetheless the scope guard looks like something I should read up on.
>>
>> Thanks for another good release.
>>
>> -JJR
>
> I thought the same, perhaps the "scope" portion is understood? So that the keywords become: onsuccess, onfailure, ...?
|
February 26, 2006 Re: DMD 0.148 - scope guard | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cris | Cris wrote: > > Yes I agree with Kyle but not to overuse simple keywords, what about something like "onSuccess:", "onFailure:", etc... Then it would look like an ordinary label, wouldn't it ? That's a different thing. > To me all "_" look ugly. Perhaps the author could ask the community for suggestions when naming new features? > Or perhaps just "onScopeSuccess", "onScopeFailure"... And these don't stand out enough IMO -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y ------END GEEK CODE BLOCK------ Tomasz Stachowiak /+ a.k.a. h3r3tic +/ |
Copyright © 1999-2021 by the D Language Foundation