August 21, 2014
On Thu, 21 Aug 2014 03:24:35 +0000
Andrew Godfrey via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

maybe just call that "slice views"? ;-)

really, uncommon term will (at least it should ;-) make user to read about that "slice views", and "reference" is something like "ah, i know what references is, let's start coding now!"


August 21, 2014
On Thu, 21 Aug 2014 06:53:32 +0300
ketmar via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

offtopic: damn it! i will read my messages before posting. i will read my messages before posting. i will read my messages before posting. i will... who i'm trying to cheat?! too bad that we can't edit messages after posting.


August 21, 2014
On Thursday, 21 August 2014 at 03:53:42 UTC, ketmar via Digitalmars-d wrote:
> On Thu, 21 Aug 2014 03:24:35 +0000
> Andrew Godfrey via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
> maybe just call that "slice views"? ;-)
>
> really, uncommon term will (at least it should ;-) make user to read
> about that "slice views", and "reference" is something like "ah, i know
> what references is, let's start coding now!"

Yeah, you have a point. "slice view" sounds odd, and I suppose all this is the background to why some parts of the docs use the term "slice" for this.
Maybe I should have another look at that - maybe introducing "slice" first and the "slice operator" later, can avoid confusion sufficiently.
August 21, 2014
On Thu, 21 Aug 2014 07:23:34 +0000
Andrew Godfrey via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> "slice view" sounds odd
i agree, i just took the first words that came into my head. ;-)

> Maybe I should have another look at that - maybe introducing "slice" first and the "slice operator" later, can avoid confusion sufficiently.
sound reasonable for me.


September 16, 2014
On Mon, 11 Aug 2014 03:04:41 -0400, Andrew Godfrey <x@y.com> wrote:

> Reminder: The PR is ready for review:
>
> https://github.com/D-Programming-Language/dlang.org/pull/623
>
> Jonathan has summarized his position in the commments.
> What do the rest of you think?
> H. S. Teoh, Jakob, Ali, Marc, Dominikus, Chris -
> your impression of whether this clears up the confusion would
> help round out the feedback.

Sorry to be chiming in late on this.

As the author of the article, I stand by my terminology, even if it's not "official." In fact, when I was writing the article, I was struggling to describe how arrays worked until I stumbled into that description, and then it all clicked pretty well.

This issue has come up before, and I can't remember what the result was, but I am not severely attached to the terminology if it hurts the documentation of D (In other words, I'm willing to allow a pull request to the article on dlang's site if it is what people want). As I recall, I was in favor of changing the official definition (though not the advocate of it), but most were not. I think the definition of dynamic array as most languages define it, and dynamic array as D defines it, are not exactly at odds with each other, but the differences are significant.

What is needed is a nice term for "reference to a chunk of data." I thought slice fit that bill nicely, but I can see how it would be confusing.

The fact that slices act sort of like dynamic arrays, even though they may not even point at arrays at all, is a very awkward definition. It would be like calling all C pointers arrays.

-Steve
September 16, 2014
We already are suing slices. We are creating the confusion by
pretending there is 2 different concepts when there is only one.
September 16, 2014
On Tuesday, 16 September 2014 at 01:32:55 UTC, deadalnix wrote:
> We already are suing slices. We are creating the confusion by
> pretending there is 2 different concepts when there is only one.

IMO, the term "slice" is not necessarily different, but rather, a *refinement* of the "dynamic array" term. Without changing any formal definition, just use the term slice whenever you can, and 95% of the ambiguity goes away.
1 2 3 4 5 6 7
Next ›   Last »