From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 20E201F55B for ; Wed, 3 Jun 2020 21:22:56 +0000 (UTC) Received: from localhost ([::1]:45498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgaqc-0005Fk-VR for normalperson@yhbt.net; Wed, 03 Jun 2020 17:22:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgaqa-0005FM-Kn for bug-gnulib@gnu.org; Wed, 03 Jun 2020 17:22:52 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:43286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgaqY-0002cq-RK for bug-gnulib@gnu.org; Wed, 03 Jun 2020 17:22:52 -0400 Received: by mail-pl1-x634.google.com with SMTP id g12so1257463pll.10 for ; Wed, 03 Jun 2020 14:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SxapgxfiHyIa7LLO62QZDE6MB1IT2BG+wHlqvC0Y7Y4=; b=YzlPBMu5zX6rnXCKEBCfyBwOQyPPVhE8vCitmgarJR946tt1xuLv3fsNp52xhIZv7c Zb4ePDoFJND/LCFuHBTlu7qxETCVXKIqjG3uvxCkNT46pq1mceGQtZUBJzOL1PTj1vPj LKfzJH7QBqK7Kyz7H9nbcpVGKEv1kDdbnWEOjx/pQP9h2o3vW7Lk4DLDwXdh1eBoTZKK /kuUpk8yP5twI0+90OtNxEYJ5Mq/1pRBvO3ics8OxLt9Pyv1rFlfHngYT/fXDbXsg5Dr B4OpRVp+7TZvUmzeu/YoHAZCASqtloV+HnNJsjJQZjvdeePefl83y4Gb+BTtNZ5DEcyq 0h3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SxapgxfiHyIa7LLO62QZDE6MB1IT2BG+wHlqvC0Y7Y4=; b=eEe8aGLGiX8TXSsWxUE2kl4Hflc11JmLm3Rh/7hBd651gk6+JMiKPYP0IhSo0JiYyd K2VHfmGyTRfRdjJvKTUcCSraAIfaMSj6ZN3SS6n3BCsk63nPOIoY8B6Y51M00N+KrlvO /8w6quyt+TYXIcTZhBoKrezwDGS0QsjRlN/PhasrQwMS5eB6LgLEeUWx2vkJbqcb3mAw etdraUAJwLSNYHRhsCJcnC3bD0ZrsnmkNBgwAvD7zkS5CUnv+VyBhcSvJzPj4BpLz7w1 kNANRXvH30lhn/nm8zjxaND+ef+Qm38N2VH0lS2mOJXYumoxn8SiJeF/Xq9g6kaqkt7O o33Q== X-Gm-Message-State: AOAM533vc/M3pR1Kd9Joy8r+PbvBf3LeFQmixyY5FPaIXS+VLa4WIn7T U+wc+3ZU8j9+JtGep5OLeV+HDZ6Av3WTCrOjW+0= X-Google-Smtp-Source: ABdhPJw9uByBDY6aCDiwLGe+YtJ1XXEPc2RBc2kfFPwR3Jt75kAUXjQZjLE08pVh4y1CQnT3cTDRAHRQn6A0HmVN2VA= X-Received: by 2002:a17:902:a515:: with SMTP id s21mr1681214plq.334.1591219368748; Wed, 03 Jun 2020 14:22:48 -0700 (PDT) MIME-Version: 1.0 References: <4261612.ILBSuMgyWs@omega> <2192308.60MnkrfRAr@omega> In-Reply-To: <2192308.60MnkrfRAr@omega> From: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= Date: Wed, 3 Jun 2020 23:22:37 +0200 Message-ID: Subject: Re: Add gl_list_remove_last to list/xlist To: Bruno Haible Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=marc.nieper@gmail.com; helo=mail-pl1-x634.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= , bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Am Mi., 3. Juni 2020 um 23:08 Uhr schrieb Bruno Haible : > It's rarely used: In most cases, a list is either traversed one way or > the other way. One could say that a list that is to be transversed in both ways is a different abstract data type; nevertheless, they appear (e.g. lists of instructions in compiler analysis usually have to traversed in both ways). > 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. For an array-based list, this is fine. For a general list, one could use gl_list_previous_node; however, one would have to keep a node of the last element (there's no gl_list_first_node/gl_list_last_node). > 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. I admit that there is some wisdom in these words. :)