On 01/02/2018 11:17 AM, Jonathan M Davis wrote:
> On Tuesday, January 02, 2018 10:37:17 Ali Çehreli via Digitalmars-d-learn
> wrote:
>> For these reasons, the interface that the program is using is a "slice".
>> Dynamic array is a different concept owned and implemented by the GC.
>
> Except that
On Tuesday, January 02, 2018 10:37:17 Ali Çehreli via Digitalmars-d-learn
wrote:
> As soon as we call it "dynamic array", I can't help but think "adding
> elements". Since GC is in the picture when that happens, it's essential
> to think GC when adding an element is involved.
>
> Further, evident
First, I'm in complete agreement with Steve on this. I wrote a response
to you yesterday, which I decided to not send after counting to ten
because despite being much more difficult, I see that your view can also
be aggreable.
On 01/02/2018 10:02 AM, Jonathan M Davis wrote:
> On Tuesday, Jan
On Tuesday, January 02, 2018 07:53:00 Steven Schveighoffer via Digitalmars-
d-learn wrote:
> On 1/1/18 12:18 AM, Jonathan M Davis wrote:
> > A big problem with the term slice though is that it means more than just
> > dynamic arrays - e.g. you slice a container to get a range over it, so
> > that r
On 1/1/18 12:18 AM, Jonathan M Davis wrote:
A big problem with the term slice though is that it means more than just
dynamic arrays - e.g. you slice a container to get a range over it, so that
range is a slice of the container even though no arrays are involved at all.
So, you really can't rely
On Monday, 1 January 2018 at 02:10:14 UTC, Jonathan M Davis wrote:
On Sunday, December 31, 2017 14:49:40 Tony via
Digitalmars-d-learn wrote:
On Sunday, 31 December 2017 at 14:24:40 UTC, Jonathan M Davis
wrote:
> [...]
The DLang Tour also uses the term slice to refer to T[].
"The type of arr i
On Monday, January 01, 2018 05:06:46 Tony via Digitalmars-d-learn wrote:
> On Monday, 1 January 2018 at 02:10:14 UTC, Jonathan M Davis wrote:
> > The DLang Tour should probably be fixed to use the term dynamic
> > array though.
>
> Or embrace both terms but take care that it is clear that they
> ar
On Monday, 1 January 2018 at 02:10:14 UTC, Jonathan M Davis wrote:
The DLang Tour should probably be fixed to use the term dynamic
array though.
Or embrace both terms but take care that it is clear that they
are synonyms and one may be preferred depending on context. As a
beginner, I had s
On Sunday, December 31, 2017 14:49:40 Tony via Digitalmars-d-learn wrote:
> On Sunday, 31 December 2017 at 14:24:40 UTC, Jonathan M Davis
>
> wrote:
> > The D Slices article does an excellent job of explaining all of
> > this. It's just that it calls the GC-allocated memory buffer
> > the dynamic a
On Sunday, 31 December 2017 at 14:24:40 UTC, Jonathan M Davis
wrote:
The D Slices article does an excellent job of explaining all of
this. It's just that it calls the GC-allocated memory buffer
the dynamic array instead of calling T[] the dynamic array like
the language and spec do. Regardl
On Sunday, December 31, 2017 01:57:58 Tony via Digitalmars-d-learn wrote:
> On Friday, 29 December 2017 at 23:13:20 UTC, Jonathan M Davis
>
> wrote:
> > The term "slice" is a bit overused in D, meaning a variety of
> > things. It doesn't help that some folks dislike the official
> > terminology. In
On Sunday, December 31, 2017 04:42:01 Tony via Digitalmars-d-learn wrote:
> On Sunday, 31 December 2017 at 04:20:28 UTC, codephantom wrote:
> > On Sunday, 31 December 2017 at 03:57:17 UTC, Tony wrote:
> >> On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley
> >>
> >> wrote:
> >>> double[] D
On 12/30/17 10:08 PM, Ivan Trombley wrote:
double[] D = [3.14159];
Can you guess what D is? :D
An approximation of a slice of pi.
-Steve
On 12/30/17 8:57 PM, Tony wrote:
For me, it is confusing to use "slice" and "dynamic array" as synonyms.
My initial impression was that they must have different code underlying
them, and different behavior.
As stated in the slices article, I think of them as separate -- the
slice is the publi
On Sunday, 31 December 2017 at 04:20:28 UTC, codephantom wrote:
On Sunday, 31 December 2017 at 03:57:17 UTC, Tony wrote:
On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley
wrote:
double[] D = [3.14159];
Can you guess what D is? :D
It took me a while but I finally came up with "a sli
On Sunday, 31 December 2017 at 03:57:17 UTC, Tony wrote:
On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley
wrote:
double[] D = [3.14159];
Can you guess what D is? :D
It took me a while but I finally came up with "a slice of pi"
a slice of pi is irrational.
On Sunday, 31 December 2017 at 03:08:05 UTC, Ivan Trombley wrote:
double[] D = [3.14159];
Can you guess what D is? :D
It took me a while but I finally came up with "a slice of pi"
double[] D = [3.14159];
Can you guess what D is? :D
On Friday, 29 December 2017 at 23:13:20 UTC, Jonathan M Davis
wrote:
The term "slice" is a bit overused in D, meaning a variety of
things. It doesn't help that some folks dislike the official
terminology. In general, a slice is a contiguous group of
elements. A slice of memory would be a contig
On Friday, December 29, 2017 22:32:01 Tony via Digitalmars-d-learn wrote:
> In DLang Tour:Arrays
> https://tour.dlang.org/tour/en/basics/arrays
>
> there is:
> ---
> int size = 8; // run-time variable
> int[] arr = new int[size];
>
> The type of arr is in
On Friday, 29 December 2017 at 22:32:01 UTC, Tony wrote:
In DLang Tour:Arrays
https://tour.dlang.org/tour/en/basics/arrays
there is:
---
int size = 8; // run-time variable
int[] arr = new int[size];
The type of arr is int[], which is a slice.
On Friday, 29 December 2017 at 22:32:01 UTC, Tony wrote:
Based on those two web pages it appears that the name for a
dynamic array in D is "slice". That is, anytime
you have a dynamic array (even a null reference version) it is
called a slice. Is that correct?
Not exactly, but basically. rea
22 matches
Mail list logo