Re: Compile-time vs. compile-time

2018-01-05 Thread ag0aep6g via Digitalmars-d
On 01/04/2018 11:59 PM, H. S. Teoh wrote: I wouldn't say that CTFE means that it is forced/guaranteed. But you're right that it could be confusing the way I described it. I added a section to clarify that usually the compiler would not use CTFE to constant-fold complex expressions, unless the

Re: Compile-time vs. compile-time

2018-01-04 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 04, 2018 at 04:57:25PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Thursday, January 04, 2018 14:59:44 H. S. Teoh via Digitalmars-d wrote: [...] > > Are you sure that's non-CTFE? Isn't standard constant folding a > > part of CTFE? Anyway, the new section should clear up

Re: Compile-time vs. compile-time

2018-01-04 Thread Jonathan M Davis via Digitalmars-d
On Thursday, January 04, 2018 14:59:44 H. S. Teoh via Digitalmars-d wrote: > On Wed, Jan 03, 2018 at 02:44:21PM +0100, ag0aep6g via Digitalmars-d wrote: > > On 01/03/2018 02:51 AM, H. S. Teoh wrote: > > > https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time#Bu > > >

Re: Compile-time vs. compile-time

2018-01-04 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 03, 2018 at 02:44:21PM +0100, ag0aep6g via Digitalmars-d wrote: > On 01/03/2018 02:51 AM, H. S. Teoh wrote: > > > > https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time#But_what_of_runtime_performance.3F > > > > object.destroy! :-P > > In the CTFE section, you

Re: Compile-time vs. compile-time

2018-01-03 Thread ag0aep6g via Digitalmars-d
On 01/03/2018 02:51 AM, H. S. Teoh wrote: https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time#But_what_of_runtime_performance.3F object.destroy! :-P In the CTFE section, you explain that it came from constant folding, but you don't point out how the two are different.

Re: Compile-time vs. compile-time

2018-01-02 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 02, 2018 at 07:26:54PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Tuesday, January 02, 2018 17:51:01 H. S. Teoh via Digitalmars-d wrote: > > object.destroy! :-P > > But that doesn't work during compile-time, does it? ;) [...] Which compile-time? :-D T -- Computers

Re: Compile-time vs. compile-time

2018-01-02 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 02, 2018 17:51:01 H. S. Teoh via Digitalmars-d wrote: > object.destroy! :-P But that doesn't work during compile-time, does it? ;) - Jonathan M Davis

Compile-time vs. compile-time

2018-01-02 Thread H. S. Teoh via Digitalmars-d
Finally got around to working on my draft article "Compile-time vs. compile-time" again today. Mainly added another case study for a commonly encountered issue, and cleaned up the outdated stuff on "static" foreach (not the *real* static foreach that we have now). Now