BTW, what would be the point of an array/vector when you have built-in
arrays? If built-in arrays would be syntax sugar for a real library type,
like AAs, I can see as a good option using Array for that type, since
built-in arrays and the library Array would be the same thing.
The biggest
Simen kjaeraas wrote:
I take it you don't work in simulation or games, then? Don't do much
linear algebra?
While I understand the reasoning for it, I dislike the name vector for
arrays. A vector to me, is a geometric object with a length and magnitude,
not a random collection of whatevers.
Jonathan M Davis:
The biggest difference is that a vector has capacity separate from its
size/length. You can efficiency insert elements at the end with a vector -
amortized constant time usually - but you can't do that with a built-in
array because it would have to reallocate every time.
Jonathan M Davis, el 28 de mayo a las 04:58 me escribiste:
BTW, what would be the point of an array/vector when you have built-in
arrays? If built-in arrays would be syntax sugar for a real library type,
like AAs, I can see as a good option using Array for that type, since
built-in arrays
On Fri, 28 May 2010 07:58:55 -0400, Jonathan M Davis
jmdavisp...@gmail.com wrote:
BTW, what would be the point of an array/vector when you have built-in
arrays? If built-in arrays would be syntax sugar for a real library
type,
like AAs, I can see as a good option using Array for that type,
== Quote from Andrei Alexandrescu
(seewebsiteforem...@erdani.org)'s article:
I defined Array as a straightforward implementation of the
homonym abstraction. There are a few imperfect corners, but
by and large I'm starting to believe it's becoming possible
to write certain cross-container
On Thu, 27 May 2010 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a straightforward implementation of the homonym
abstraction. There are a few imperfect
On Fri, 28 May 2010 15:51:53 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Thu, 27 May 2010 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a
On 05/28/2010 02:51 PM, Steven Schveighoffer wrote:
On Thu, 27 May 2010 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a straightforward implementation of the
On Fri, 28 May 2010 16:03:10 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 05/28/2010 02:51 PM, Steven Schveighoffer wrote:
On Thu, 27 May 2010 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
http://erdani.com/d/phobos/std_container.html
On Thu, 27 May 2010 00:36:24 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just implemented a singly-linked list type to illustrate the container
abstraction.
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
One interesting aspect is
On Thu, 27 May 2010 09:23:03 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Thu, 27 May 2010 00:36:24 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just implemented a singly-linked list type to illustrate the
container abstraction.
On Thu, 27 May 2010 09:27:39 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Thu, 27 May 2010 09:23:03 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Thu, 27 May 2010 00:36:24 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just implemented a
On Thu, 27 May 2010 00:36:24 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I just implemented a singly-linked list type to illustrate the container
abstraction.
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
One interesting aspect is
On 05/27/2010 08:23 AM, Steven Schveighoffer wrote:
You're making a number of great points in the four posts starting with
this. Since they sort of augment one another, let me quote and answer
them all here.
On Thu, 27 May 2010 00:36:24 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org
== Quote from Andrei Alexandrescu
(seewebsiteforem...@erdani.org)'s article:
I just implemented a singly-linked list type to illustrate
the container abstraction.
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
[...]
Please let me know of how you find it.
On 05/27/2010 11:01 AM, Pillsy wrote:
== Quote from Andrei Alexandrescu
(seewebsiteforem...@erdani.org)'s article:
I just implemented a singly-linked list type to illustrate
the container abstraction.
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
[...]
Another update:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I simplified the implementation (no more array allocation etc.),
eliminated replace() and insertBefore() after convincing myself they are
not a good fit for lists, and added
I take it that Array is basically supposed to be std.container's version of
C++'s vector or Java's ArrayList? If so, I would suggest that Array is not
the best of names in that it would become very easy to confuse it with
built-in arrays when discussing them (particularly in verbal
Jonathan M Davis jmdavisp...@gmail.com wrote:
wouldn't be confused with anything else. If you really want Array, that's
Personally, I would have just gone with Vector, since it's a fairly
standard name for that sort of container and wouldn't be confused with
anything else.
I take it you don't
On 05/27/2010 06:28 PM, Jonathan M Davis wrote:
I take it that Array is basically supposed to be std.container's version of
C++'s vector or Java's ArrayList? If so, I would suggest that Array is not
the best of names in that it would become very easy to confuse it with
built-in arrays when
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a straightforward implementation of the homonym
abstraction. There are a few imperfect corners, but by and large I'm
starting to believe it's becoming possible to write certain
Andrei Alexandrescu, el 27 de mayo a las 20:06 me escribiste:
On 05/27/2010 06:28 PM, Jonathan M Davis wrote:
I take it that Array is basically supposed to be std.container's version of
C++'s vector or Java's ArrayList? If so, I would suggest that Array is not
the best of names in that it
On 2010-05-27 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a straightforward implementation of the homonym
abstraction. There are a few imperfect corners, but
On 05/27/2010 09:27 PM, Michel Fortin wrote:
On 2010-05-27 21:08:29 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
I defined Array as a straightforward implementation of the homonym
On 05/27/2010 08:42 PM, Leandro Lucarella wrote:
Andrei Alexandrescu, el 27 de mayo a las 20:06 me escribiste:
On 05/27/2010 06:28 PM, Jonathan M Davis wrote:
I take it that Array is basically supposed to be std.container's version of
C++'s vector or Java's ArrayList? If so, I would suggest
I just implemented a singly-linked list type to illustrate the container
abstraction.
http://erdani.com/d/phobos/std_container.html
http://erdani.com/d/phobos/container.d
One interesting aspect is that SList must cooperate with Take. More
details are to be found in code, but essentially SList
27 matches
Mail list logo