Re: Is there a way to call scope guard without throw exception?

2018-01-03 Thread ChangLong via Digitalmars-d
On Tuesday, 2 January 2018 at 07:10:14 UTC, ChangLong wrote: On Monday, 1 January 2018 at 03:06:42 UTC, David Nadlinger wrote: On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: After fiber yield, the spoke guard is not able to execute, unless I throw a exception in Fiber. I am l

Re: Is there a way to call scope guard without throw exception?

2018-01-01 Thread ChangLong via Digitalmars-d
On Monday, 1 January 2018 at 03:06:42 UTC, David Nadlinger wrote: On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: After fiber yield, the spoke guard is not able to execute, unless I throw a exception in Fiber. I am look if there is some hack method to make the fiber Interrupte

Is there a way to call scope guard without throw exception?

2017-12-30 Thread ChangLong via Digitalmars-d
I try to find a way to yield custom fiber without throw exception, is it possible ? I need make sure the scope guard is executed and the resource will auto release relay on scope(exit). After fiber yield, the spoke guard is not able to execute, unless I throw a exception in Fiber. I am lo

Re: D as a betterC a game changer ?

2017-12-27 Thread ChangLong via Digitalmars-d
On Thursday, 28 December 2017 at 03:31:19 UTC, ChangLong wrote: On Wednesday, 27 December 2017 at 10:08:37 UTC, Walter Bright wrote: On 12/27/2017 12:59 AM, Dan Partelly wrote: All could have been prevented by going the C++ route of 0 cost abstraction, C++ is not 0 cost abstraction, despite the

Re: D as a betterC a game changer ?

2017-12-27 Thread ChangLong via Digitalmars-d
On Wednesday, 27 December 2017 at 10:08:37 UTC, Walter Bright wrote: On 12/27/2017 12:59 AM, Dan Partelly wrote: All could have been prevented by going the C++ route of 0 cost abstraction, C++ is not 0 cost abstraction, despite the marketing. It's why C++ compilers have switches to disable thin

Re: I hate new DUB config format

2015-11-27 Thread ChangLong via Digitalmars-d
On Wednesday, 25 November 2015 at 10:17:02 UTC, Suliman wrote: If SDL will stay by default I will prefer to move to any other build system or will downgrade to old version of DUB. JSON +1

Re: dmd codegen improvements

2015-08-19 Thread ChangLong via Digitalmars-d
On Tuesday, 18 August 2015 at 12:58:45 UTC, Dicebot wrote: On Tuesday, 18 August 2015 at 12:37:37 UTC, Vladimir Panteleev wrote: I think stability of the DMD backend is a goal of much higher value than the performance of the code it emits. DMD is never going to match the code generation quality

Re: Writing/Creating files at compile-time

2015-08-09 Thread ChangLong via Digitalmars-d
On Sunday, 9 August 2015 at 09:07:51 UTC, JDemler wrote: We can read files at compile-time: enum file = import(fileName); But we cannot write to a file or create files at compile time. Generating code at compile-time and mixing it in is fun but has a few flaws. It isn't debuggable, the gene

Re: Proposal : mnemonic for start index for slices

2015-08-08 Thread ChangLong via Digitalmars-d
On Saturday, 8 August 2015 at 13:08:08 UTC, Temtaime wrote: Hi ! I want to add some sugar to D : sometimes it's necessary to use complex start index. For example: auto sub = arr[idx + 123 * 10..idx + 123 * 10 + 1]; Proposal is to add a mnemonic for start index, for instance : auto sub = arr[

Re: Interfaces, traits, concepts, and my idea for a DIP

2015-07-28 Thread ChangLong via Digitalmars-d
On Tuesday, 28 July 2015 at 12:49:17 UTC, Atila Neves wrote: So... instead of having traits / concepts, what I wanted from D is to be able to do this: struct MyRange: isInputRange { ... } or struct MyRange: static isInputRange { ... } // that way classes could do this too +1 Concept like

Re: Where will D sit in the web service space?

2015-07-14 Thread ChangLong via Digitalmars-d
On Monday, 13 July 2015 at 15:57:41 UTC, Kagamin wrote: On Monday, 13 July 2015 at 12:12:22 UTC, ChangLong wrote: 3) No Inversion of Control (aka: Dependency Injection) Concept Since this is a broad term, on which level do you miss an explicit concept for this? Any concrete example? Like this

Re: Where will D sit in the web service space?

2015-07-13 Thread ChangLong via Digitalmars-d
On Monday, 13 July 2015 at 10:49:16 UTC, Sönke Ludwig wrote: Am 13.07.2015 um 06:29 schrieb ChangLong: I has use vibe.d for a small project recently, after finish that I think the follow fact will prevent many programmers use vibe.d in commercial projects: 1) Lack of successful open source pr

Re: Where will D sit in the web service space?

2015-07-13 Thread ChangLong via Digitalmars-d
On Monday, 13 July 2015 at 10:12:33 UTC, Faux Amis wrote: On Mon 13/07/2015 06:29, ChangLong wrote: On Sunday, 12 July 2015 at 12:14:31 UTC, Ola Fosheim Grøstad wrote: -snip- What do you think about the future for D in the web service space? I has use vibe.d for a small project recently, a

Re: Where will D sit in the web service space?

2015-07-12 Thread ChangLong via Digitalmars-d
On Sunday, 12 July 2015 at 12:14:31 UTC, Ola Fosheim Grøstad wrote: I've been thinking a bit about where languages fit in the web service space. Both mobile app and web services are likely candidates for typed and efficient languages. I'm not at all happy with the "prolific" choices that are av