Well, perhaps we both didn't understand each other
I'll try to be clearer and also understand your points better.
> > -1
>
> First I want to say that I do not mind hijacking threads at all so be
> me guest
> But I have not talked about the things you are talking here.
> >
> > Though I can understand why it looks like an iceberg, I think it's one
> > of those programmer icebergs that we invent to complete sets.
> The iceberg is somewhere else but I do not want to talk about it yet.
> >
> > Why?
> >
> > #succ is for #each .
> >
> > #each is truly essential, as it gives totally new functonality.
> >
> > #pred would be for a "different order of each".
> No sir, your interpretation, I do not advocate a different order of
> each I am only talking about #pred.
>
Have you found useful uses of #pred in a general case (not just for
Integer) that is not essentially built on iteration? If so, I
apologize. I couldn't find any clue to the existence of such from your
post. Would you please elaborate?
> It was just when I wanted for demonstration purpose implement a
> generic reverse_each that I realized that I was missing #pred in a
> more general way.
>
What is this more general way?
E.g. for String, alas David just showed me in the countdown thread
that this is not possible.
So this thread stops here from my POV because my ideas are not
"reasonable" anymore.
> > Now, yes, I do know
> > that there /is/ some use for reverse-each, but there are MANY OTHER
> > different order-eaches that are as important. That's why
> > #to_a.reverse.each is for those cases, that aren't so abundant as to
> > /need/ a #reverse_each .
> >
> > If a fast reverse_each is needed, it's usually about numbers and then
> > you have Numeric#step .
> >
> > Perhaps there would be use for this as a library, MAYBE even a
> > standard library, but I wouldn't throw this in core Ruby.
> What I am talking about *is* already in the core for Integer and I am
> drying to apply the same logic to other #succ receivers.
>
> I really feel very bad not having given enough thought to the RCR.
Not so much anymore.
> >
> > reverse_each isn't more useful than any other case of sorted_each.
> That could be argued but is completely OT.
What I meant is that any use case of #pred I could find is a use case
that I would attribute to "traverse the range in an arbitrary order".
Not because it is more general, just because it fits the thought
template of it. It "feels" like a particular case of aforementioned
abstraction, and not like a particular abstraction.
It is of course a good idea when concieving a tool thinking about
usage, 1:0 for you
> >
> > Hmm, maybe we should implement that (no ue really, it's so slow it's
> > better left out of the path of least resistance.)
> >
> Again you'r making valid and reasonable points, no problem with that,
> but they are not related to what I wanted to say. Well I feel at
> least.
>
What use cases for #pred did you find that you were missing?
None anymore
> Robert
> --
> We have not succeeded in answering all of our questions.
> In fact, in some ways, we are more confused than ever.
> But we feel we are confused on a higher level and about more important things.
> -Anonymous
>
I will try to get some sleep now, and in some days I will throw the
rage of the ruby gods on myself again, and I will talk about the
Iceberg.
For now just as much, *I am not happy with Comparable* and I like the
less pattern.
Cheers
Robert
···
On 2/19/07, SonOfLilit <sonoflilit@gmail.com> wrote:
On 2/19/07, Robert Dober <robert.dober@gmail.com> wrote:
> On 2/19/07, SonOfLilit <sonoflilit@gmail.com> wrote:
--
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important things.
-Anonymous