Hello,
I just added SortedRange as discussed a while ago in this newsgroup. I
think it turned out pretty neat. Generally the range abstraction is
turning out to be very solid.
To get a SortedRange object for a given range r either call sort(r) if
you want to sort one, or assumeSorted(r) if
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> Hello,
> I just added SortedRange as discussed a while ago in this newsgroup. I
> think it turned out pretty neat. Generally the range abstraction is
> turning out to be very solid.
> To get a SortedRange object for a giv
On 9/8/10 9:21 CDT, dsimcha wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Hello,
I just added SortedRange as discussed a while ago in this newsgroup. I
think it turned out pretty neat. Generally the range abstraction is
turning out to be very solid.
To get a
Andrei:
> I've also fixed Zip (finally!) to get rid of a couple of dirty tricks.
> It turns out that front()/front(v)/moveFront() are a correct way to
> abstract proxy ranges like Zip is.
In this changeset:
http://www.dsource.org/projects/phobos/changeset/1968
I see code as:
auto arr2 = t.fiel
I don't want to hijack the topic, but can I ask a question?
In the Phobos docs I often see this kind of code:
assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][]));
What is the purpose of the extra square brackets after the array
literal? Because the code works both with and without them.
On Wed, Sep 8
On 9/8/10 12:06 CDT, Andrej Mitrovic wrote:
I don't want to hijack the topic, but can I ask a question?
In the Phobos docs I often see this kind of code:
assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][]));
What is the purpose of the extra square brackets after the array
literal? Because the code wo
On 9/8/10 11:52 CDT, bearophile wrote:
Andrei:
I've also fixed Zip (finally!) to get rid of a couple of dirty tricks.
It turns out that front()/front(v)/moveFront() are a correct way to
abstract proxy ranges like Zip is.
In this changeset:
http://www.dsource.org/projects/phobos/changeset/1968
Andrei Alexandrescu Wrote:
> On 9/8/10 12:06 CDT, Andrej Mitrovic wrote:
> > I don't want to hijack the topic, but can I ask a question?
> >
> > In the Phobos docs I often see this kind of code:
> >
> > assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][]));
> >
> > What is the purpose of the extra square
Wow, you can actually interpret code on that site. Nice. I wonder how
safe that is for them..
On Wed, Sep 8, 2010 at 9:47 PM, Jesse Phillips
wrote:
You can use literals to create static arrays by giving the type you want.
>
> http://ideone.com/qInPu
>
> The default was changed because Phobos was
Jesse Phillips:
> The default was changed because Phobos was littered with [...][] in all the
> tests... Andrei must have gotten annoyed. :)
The default was changed because most times you want a dynamic array. (On the
other hand I don't love the amount of memory allocations caused by the current
Dnia 08-09-2010 o 15:55:30 Andrei Alexandrescu
napisał(a):
I just added SortedRange as discussed a while ago in this newsgroup. I
think it turned out pretty neat. Generally the range abstraction is
turning out to be very solid.
To get a SortedRange object for a given range r either call
Tomek Sowiński napisał:
> 2. Could makeIndex() also return SortedRange? The predicate should be
> morphed of course to account for dereferencing.
Or better: SortedRange's underlying range should account for dereferencing and
leave the predicate intact.
Tomek
12 matches
Mail list logo