Re: Go Your Own Way (Part One: The Stack)

2017-07-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 7/7/17 9:51 PM, Mike Parker wrote: On Saturday, 8 July 2017 at 01:28:59 UTC, Walter Bright wrote: On 7/7/2017 4:35 PM, Nicholas Wilson wrote: It's an intrinsic in LDC. We can certainly drop the per platform and move to a per compiler definition instead. It's already there under:

Re: Go Your Own Way (Part One: The Stack)

2017-07-08 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 6:51 PM, Mike Parker wrote: I read this as CRuntime_DigitalMars, which prompted a search that led me to a page at MSDN on _alloca, which gave me a compiler error when I prototyped it, which led to my prototyping alloca for CRuntime_Microsoft and finding success, which has now

Re: Go Your Own Way (Part One: The Stack)

2017-07-08 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 6:28 PM, Walter Bright wrote: On 7/7/2017 4:35 PM, Nicholas Wilson wrote: It's an intrinsic in LDC. We can certainly drop the per platform and move to a per compiler definition instead. It's already there under: version (DigitalMars) Just to beat that dead horse into the

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Mike Parker via Digitalmars-d-announce
On Saturday, 8 July 2017 at 01:28:59 UTC, Walter Bright wrote: On 7/7/2017 4:35 PM, Nicholas Wilson wrote: It's an intrinsic in LDC. We can certainly drop the per platform and move to a per compiler definition instead. It's already there under: version (DigitalMars) I read this as

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 4:35 PM, Nicholas Wilson wrote: It's an intrinsic in LDC. We can certainly drop the per platform and move to a per compiler definition instead. It's already there under: version (DigitalMars)

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread H. S. Teoh via Digitalmars-d-announce
On Fri, Jul 07, 2017 at 07:12:28PM -0600, Jonathan M Davis via Digitalmars-d-announce wrote: > On Friday, July 7, 2017 1:48:47 PM MDT Adam D. Ruppe via Digitalmars-d- > announce wrote: [...] > > The implicit slice is one of what I see as D's design flaws and > > brings up a number of problems.

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Jonathan M Davis via Digitalmars-d-announce
On Friday, July 7, 2017 1:48:47 PM MDT Adam D. Ruppe via Digitalmars-d- announce wrote: > I would add a note to the "static arrays are interchangeable with > dynamic arrays" saying that you can... and probably should > explicitly slice them with `[]`. > > The implicit slice is one of what I see as

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Nicholas Wilson via Digitalmars-d-announce
On Friday, 7 July 2017 at 22:42:08 UTC, Walter Bright wrote: On 7/7/2017 1:33 PM, Steven Schveighoffer wrote: Since it's an intrinsic (as confirmed by you), maybe we can just drop the version conditions? The compiler will always generate it, regardless of C lib, right? I'll do the PR if you

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 1:33 PM, Steven Schveighoffer wrote: Since it's an intrinsic (as confirmed by you), maybe we can just drop the version conditions? The compiler will always generate it, regardless of C lib, right? I'll do the PR if you agree (just want to make sure I understand your statements

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Steven Schveighoffer via Digitalmars-d-announce
On 7/7/17 4:10 PM, Walter Bright wrote: On 7/7/2017 12:38 PM, Steven Schveighoffer wrote: Which would mean that the lack of alloca prototype on Windows is a straight up bug (the fact that you can just add the declaration and it works is pretty good proof). It's in core.stdc.stdlib Since

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Mike Wey via Digitalmars-d-announce
On 07-07-17 22:10, Walter Bright wrote: On 7/7/2017 12:38 PM, Steven Schveighoffer wrote: Which would mean that the lack of alloca prototype on Windows is a straight up bug (the fact that you can just add the declaration and it works is pretty good proof). It's in core.stdc.stdlib Only for

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 12:38 PM, Steven Schveighoffer wrote: Which would mean that the lack of alloca prototype on Windows is a straight up bug (the fact that you can just add the declaration and it works is pretty good proof). It's in core.stdc.stdlib

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Walter Bright via Digitalmars-d-announce
On 7/7/2017 12:36 PM, Steven Schveighoffer wrote: I thought alloca was an intrinsic? Which means that the compiler generates inline code to add to the stack. I would think it has to do this, since actually calling a function would generate a new stack frame. Yes and yes.

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Steven Schveighoffer via Digitalmars-d-announce
On 7/7/17 3:36 PM, Steven Schveighoffer wrote: I thought alloca was an intrinsic? Which means that the compiler generates inline code to add to the stack. Which would mean that the lack of alloca prototype on Windows is a straight up bug (the fact that you can just add the declaration and

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Steven Schveighoffer via Digitalmars-d-announce
heap allocations. If my luck holds out, we're about to see a flurry of guest posts and collaborations over the next few weeks. If that pans out, I expect to publish the part two in mid-late August. The blog: https://dlang.org/blog/2017/07/07/go-your-own-way-part-one-the-stack/ Reddit: https

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Guillaume Piolat via Digitalmars-d-announce
On Friday, 7 July 2017 at 13:48:47 UTC, Adam D. Ruppe wrote: I would add a note to the "static arrays are interchangeable with dynamic arrays" saying that you can... and probably should explicitly slice them with `[]`. The implicit slice is one of what I see as D's design flaws and brings up

Re: Go Your Own Way (Part One: The Stack)

2017-07-07 Thread via Digitalmars-d-announce
will deal with non-GC heap allocations. If my luck holds out, we're about to see a flurry of guest posts and collaborations over the next few weeks. If that pans out, I expect to publish the part two in mid-late August. The blog: https://dlang.org/blog/2017/07/07/go-your-own-way-part-one

Go Your Own Way (Part One: The Stack)

2017-07-07 Thread Mike Parker via Digitalmars-d-announce
out, we're about to see a flurry of guest posts and collaborations over the next few weeks. If that pans out, I expect to publish the part two in mid-late August. The blog: https://dlang.org/blog/2017/07/07/go-your-own-way-part-one-the-stack/ Reddit: https://www.reddit.com/r/programming