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-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 3C49E1F5AE for ; Thu, 6 May 2021 00:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbhEFAPb (ORCPT ); Wed, 5 May 2021 20:15:31 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:60263 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbhEFAP3 (ORCPT ); Wed, 5 May 2021 20:15:29 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 1D42AD32AD; Wed, 5 May 2021 20:14:31 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=mSkP6ACzXDxf6sdzKTBMLCC/pxljTFVni+1EPA fbxck=; b=G+K3UZyJUNKtXSFWl2oG3YxSOzM11jEnft1s63JaA/xFuo6UhQ6AG3 v/UoJHBFY1wM0V9E7H77QpFJNLCe6q7KkShgm+eI9q3DRNV2vzbJUxk59+ybVII0 cCr5Reh1oU2XMkt25mE5A53TlASwtC/TR3rDyCxWLwi795SnJqGVs= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 151FDD32AC; Wed, 5 May 2021 20:14:31 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 9C177D32AB; Wed, 5 May 2021 20:14:30 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , git@vger.kernel.org Subject: Re: [PATCH 2/5] streaming.c: remove enum/function/vtbl indirection References: Date: Thu, 06 May 2021 09:14:29 +0900 In-Reply-To: (Jeff King's message of "Wed, 5 May 2021 09:42:09 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 070E366E-AE00-11EB-921D-74DE23BA3BAF-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff King writes: >> We can thus remove the entire enum, and the "open_istream_tbl" virtual >> table that (indirectly) referenced it. > > Yeah, I think this is simpler. The value of the vtable was that we might > have added more functions to it, but we haven't done so over the course > of the last 10 years. And I have trouble imagining for what purpose we > would. So it seems like unnecessary complexity. The code hasn't changed all that much since it was written, so another equally plausible way forward is not to touch it at all ;-), but I am fine with this simplification, too.