Jump to page: 1 216  
Page
Thread overview
DMD 0.148 - scope guard
Feb 26, 2006
Walter Bright
Feb 26, 2006
Georg Wrede
Feb 26, 2006
Derek Parnell
Feb 26, 2006
Walter Bright
Feb 26, 2006
Derek Parnell
Feb 27, 2006
Bruno Medeiros
Feb 27, 2006
Walter Bright
Feb 27, 2006
Andrew Fedoniouk
Feb 28, 2006
Walter Bright
Feb 28, 2006
Mike Capp
Feb 28, 2006
Walter Bright
Feb 26, 2006
Tom
Feb 26, 2006
Walter Bright
Feb 26, 2006
John Reimer
Feb 26, 2006
Walter Bright
Feb 26, 2006
Hasan Aljudy
Feb 26, 2006
Walter Bright
Feb 27, 2006
Miles
Feb 27, 2006
Walter Bright
Feb 27, 2006
Wang Zhen
Feb 27, 2006
Lionello Lunesu
Feb 27, 2006
Lionello Lunesu
Feb 27, 2006
Lionello Lunesu
Feb 28, 2006
Hasan Aljudy
Feb 28, 2006
Sean Kelly
Feb 26, 2006
Walter Bright
Feb 26, 2006
Kyle Furlong
Feb 26, 2006
Nick
Feb 26, 2006
John Reimer
Feb 26, 2006
Cris
Feb 26, 2006
Tom S
Feb 26, 2006
Cris
Feb 26, 2006
Chris Sauls
Feb 26, 2006
Knud Sørensen
Feb 26, 2006
bobef
Feb 26, 2006
Derek Parnell
Feb 26, 2006
James Dunne
Feb 26, 2006
Charles
Feb 26, 2006
Knud Sørensen
Feb 26, 2006
Thomas Kuehne
Feb 26, 2006
Hasan Aljudy
Mar 01, 2006
Kevin Bealer
Feb 26, 2006
Kyle Furlong
Feb 26, 2006
James Dunne
Feb 26, 2006
James Dunne
Feb 26, 2006
James Dunne
Feb 26, 2006
Kyle Furlong
Feb 26, 2006
Kyle Furlong
Feb 26, 2006
Kyle Furlong
Feb 26, 2006
Regan Heath
Feb 26, 2006
John Reimer
Feb 26, 2006
Cris
Feb 27, 2006
Cris
Feb 27, 2006
John Reimer
Feb 27, 2006
h3
Feb 26, 2006
Carlos Santander
Feb 26, 2006
Charles
Feb 26, 2006
Sean Kelly
Feb 27, 2006
Jim H
Feb 27, 2006
Ben Hinkle
Feb 27, 2006
Walter Bright
Feb 27, 2006
Bruno Medeiros
Feb 27, 2006
Chris Miller
Feb 27, 2006
Lars Ivar Igesund
Feb 27, 2006
Derek Parnell
Feb 27, 2006
Chris Miller
Mar 01, 2006
Georg Wrede
Feb 28, 2006
Wang Zhen
Feb 28, 2006
Lucas Goss
Feb 28, 2006
Lars Ivar Igesund
Feb 27, 2006
Charles
Feb 28, 2006
Yves Jacoby
Feb 28, 2006
Bruno Medeiros
Feb 28, 2006
Stewart Gordon
Negative
Feb 27, 2006
Andrew Fedoniouk
Feb 27, 2006
xs0
Feb 27, 2006
Andrew Fedoniouk
Feb 27, 2006
Carlos Santander
Feb 28, 2006
Andrew Fedoniouk
Feb 28, 2006
Carlos Santander
Feb 28, 2006
Walter Bright
Feb 27, 2006
Regan Heath
Feb 28, 2006
Andrew Fedoniouk
Feb 28, 2006
Regan Heath
Feb 28, 2006
Andrew Fedoniouk
Feb 28, 2006
Walter Bright
Feb 28, 2006
Andrew Fedoniouk
Feb 28, 2006
Walter Bright
Feb 28, 2006
Sean Kelly
Feb 28, 2006
Walter Bright
Feb 28, 2006
Sean Kelly
Feb 28, 2006
Walter Bright
Feb 28, 2006
Sean Kelly
Feb 28, 2006
Derek Parnell
Mar 01, 2006
Walter Bright
Mar 01, 2006
Andrew Fedoniouk
Mar 01, 2006
Walter Bright
Mar 01, 2006
Sean Kelly
Mar 01, 2006
Walter Bright
Mar 01, 2006
Sean Kelly
Mar 01, 2006
Walter Bright
Mar 02, 2006
Kevin Bealer
Mar 02, 2006
ianc
Mar 02, 2006
pragma
Mar 02, 2006
Walter Bright
why and how D can solve the next software crisis (was Re: Negative)
Mar 03, 2006
Kevin Bealer
Mar 03, 2006
ianc
Mar 07, 2006
Georg Wrede
Mar 03, 2006
Kevin Bealer
Mar 03, 2006
Kevin Bealer
Mar 03, 2006
ianc
Mar 03, 2006
Sean Kelly
Mar 03, 2006
Mike Capp
Mar 04, 2006
Hasan Aljudy
Mar 02, 2006
David Medlock
Mar 03, 2006
Andrew Fedoniouk
Mar 03, 2006
David Medlock
Mar 03, 2006
Juan Jose Comellas
Mar 03, 2006
AgentOrange
Re: Negative (or why people started adopting java)
Mar 03, 2006
Matthias Spycher
Mar 04, 2006
David Medlock
Mar 02, 2006
Don Clugston
Mar 01, 2006
Don Clugston
Mar 01, 2006
Stewart Gordon
Mar 01, 2006
Sean Kelly
Mar 01, 2006
Stewart Gordon
Mar 01, 2006
Walter Bright
Feb 27, 2006
clayasaurus
Feb 28, 2006
Wang Zhen
Feb 28, 2006
S. Chancellor
Feb 28, 2006
Regan Heath
try..catch..pass..finally Was: DMD 0.148 - scope guard
Feb 28, 2006
Tom Johnson
Feb 28, 2006
Regan Heath
Feb 28, 2006
Tom Johnson
Feb 28, 2006
Stewart Gordon
Mar 01, 2006
S. Chancellor
Mar 01, 2006
Walter Bright
Mar 04, 2006
S. Chancellor
Mar 04, 2006
Regan Heath
Feb 28, 2006
Andrew Fedoniouk
Mar 01, 2006
S. Chancellor
Feb 28, 2006
Ant
February 26, 2006
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


February 26, 2006
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

Neat!


February 26, 2006
On Sun, 26 Feb 2006 13:06:36 +1100, Walter Bright <newshound@digitalmars.com> 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

Wow! I know of one other language that (almost) implements this.

Does 'scope' mean any type scope, and not just function scope? For example, can it include module scope? ... if/while/for/foreach scope? ... block scope?

And I assume 'statement' can be a block of statements ...

    on_exit_scope { stmt1; stmt2; ... stmtn;}

-- 
Derek Parnell
Melbourne, Australia
February 26, 2006
"Derek Parnell" <derek@psych.ward> wrote in message news:op.s5j942tp6b8z09@ginger.vic.bigpond.net.au...
> Wow! I know of one other language that (almost) implements this.

Which one?

> Does 'scope' mean any type scope, and not just function scope? For example, can it include module scope? ... if/while/for/foreach scope? ... block scope?

Yes.

> And I assume 'statement' can be a block of statements ...
>
>     on_exit_scope { stmt1; stmt2; ... stmtn;}

Yup. (The C++ macro version is limited to a single function call with argument.)


February 26, 2006
On Sun, 26 Feb 2006 14:51:45 +1100, Walter Bright <newshound@digitalmars.com> wrote:

>
> "Derek Parnell" <derek@psych.ward> wrote in message
> news:op.s5j942tp6b8z09@ginger.vic.bigpond.net.au...
>> Wow! I know of one other language that (almost) implements this.
>
> Which one?

Progess. Its a Database 4GL. It handles the on_exit, on_failure situations but not to the extent that D now does with the 'statement' flexibility.  A very neat solution.

-- 
Derek Parnell
Melbourne, Australia
February 26, 2006
In article <dtr2fg$2vqr$4@digitaldaemon.com>, Walter Bright says...
>
>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

Again the release is very nice!

A question: I seemed to miss the scope guard discussion (whatever). Can you
enlighten me with an example (or guide me with a link) to illustrate the
usefulness of this feature?

Thanks,

P.S.: In the new docs for the scope guard stuff there is a TYPO at "[snip] close of the scope, they also are interleaved with the OnScopeStatements in the reverse *lexeical* order in which they appear."

Tom;
February 26, 2006
"Tom" <Tom_member@pathlink.com> wrote in message news:dtrakc$6lo$1@digitaldaemon.com...
> A question: I seemed to miss the scope guard discussion (whatever). Can
> you
> enlighten me with an example (or guide me with a link) to illustrate the
> usefulness of this feature?

This article has some good examples:
www.digitalmars.com/d/exception-safe.html
Also, do a google groups search on "Alexandrescu on_scope_exit" for a good
thread on it.

>
> Thanks,
>
> P.S.: In the new docs for the scope guard stuff there is a TYPO at "[snip]
> close
> of the scope, they also are interleaved with the OnScopeStatements in the
> reverse *lexeical* order in which they appear."

Thanks, I'll fix it.


February 26, 2006
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
February 26, 2006
"John Reimer" <terminal.node@gmail.com> wrote in message news:dtrg0e$c9k$1@digitaldaemon.com...
> Nice feature, but rather ugly to look at; although, I'm not sure how something like that could be made to look pretty.

I think it's ugly, too, but I just couldn't come up with anything significantly better.

> Nonetheless the scope guard looks like something I should read up on.
>
> Thanks for another good release.

You're welcome.


February 26, 2006
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, ...?
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11