bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add gl_list_remove_last to list/xlist


From: Bruno Haible
Subject: Re: Add gl_list_remove_last to list/xlist
Date: Wed, 03 Jun 2020 23:08:24 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; )

Hi Marc,

> now that some operations together with their complexity for dealing
> with the end of the list have been added, what do you think of adding
> a reverse iterator?

Not a good idea, IMO.

It's rarely used: In most cases, a list is either traversed one way or
the other way.

If a list going to be traversed in reverse order, the programmer can just
keep it in opposite order and use the normal forward iterator.
Or they can use an array (or an array-based list) and use indices.

I find the amount of bloat in the C++ standard library horrible. In C
at least, we can concentrate on the things that get used, not on the
things that some rare programmer might find useful some day.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]