From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el Date: Fri, 25 Nov 2022 23:55:57 +0000 Message-ID: <878rjytwqa.fsf@gmail.com> References: <87zgcq68zp.fsf@ericabrahamsen.net> <877czqtyfy.fsf@dfreeman.email> <87zgcml7g7.fsf@gmail.com> <2ba04533-097a-a1da-ff3f-2c9506fd488e@yandex.ru> <875yf9bbzb.fsf@gmail.com> <87wn7oa0aw.fsf@gmail.com> <7a5b76fd-fb15-8c1e-ea29-bf11f7e0d2ae@yandex.ru> <87bkoya815.fsf@gmail.com> <0024a67d-b8e5-b35c-1b22-82541a170eb3@yandex.ru> <871qptai4d.fsf_-_@gmail.com> <83o7swyipe.fsf@gnu.org> <83sfi7v6dj.fsf@gnu.org> <45549e6b-942f-ee99-9123-8176545a159e@yandex.ru> <83zgceu8ch.fsf@gnu.org> <7c34024e-c2b6-033f-ff37-a0fdfc9f0cdb@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12778"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 00:55:21 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oyiXR-00033t-H3 for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 00:55:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyiWt-0003CU-25; Fri, 25 Nov 2022 18:54:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyiWq-0003C3-LZ for emacs-devel@gnu.org; Fri, 25 Nov 2022 18:54:44 -0500 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyiWo-0007oN-Vv; Fri, 25 Nov 2022 18:54:44 -0500 Original-Received: by mail-wm1-x32d.google.com with SMTP id 83-20020a1c0256000000b003d03017c6efso6561080wmc.4; Fri, 25 Nov 2022 15:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d0blNW7WC+sKD9dXUMfW/15NEiW1C/+t2aSHgr6UcOw=; b=JH6b3UlYaO4Dx5O88ngwLlBcuvhk4UOv0PyHHODjSgjsLolGNuE2UtTii8pMIC/x2E PEF9O+/abKCAz5U2vbdzLHT+dRaoG+g5cU039J7lFjEt7T+nBRF0LSXjTGbC9JaKzeHc yvdP1jUNmKeB23jUmggLnJIwKbt4uJu5i6q9sRnT4cwANELEF8aV269Qq4G4x/KicJNK GZKnTQ1E48+R+7xE7WLzKp7n4gVBS1MQgIZq0w+CBD6XFSS8LjWpPqnxW+3ARYYGf/y7 asiVCwsm2hXCDtHoBV2TLRyL71rWnZOcAy6ytwe+Qjeu0tBY9f6r178la1TzQqSMLHQl LXYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=d0blNW7WC+sKD9dXUMfW/15NEiW1C/+t2aSHgr6UcOw=; b=oMNwBEQD4vP1oxL7YdApkYSqTfiovRz4VCi9urvUPJaErVDljBP112u7Va+xIIBQeZ dKoXBtbCPZdYcw3F/QM5svtON9cFydTtjzBTss1J/+1pS24M8bOg0fJWy0fGPYQIj7Qk Bi9x/zxVCuulInmVWYjykkhOq5KcdtTOGfAQOrGylGtng3Q42mwvNjuFCaX4G6yF4lKJ e3lWA4HiEhaNLul5vrasGQbBLCmv1BCmfHYeF2eekwL64ItgTORsGPY7Jr5xU7UaOb/6 wj1QuKnwaWos2WIxansuz3ZnrH2rbLpyRdmEeAUnV4Ne5bLpiEnbrQYFTLmPXx3Qpo9t s0fQ== X-Gm-Message-State: ANoB5plTDkZIDVgI68xWezvHgmZ5fWuIbhgRMho2mkV6QPnIqxGmpPCF 3mJMqjt6GfzlKHmTXmgn5ttuVAtKevI= X-Google-Smtp-Source: AA0mqf5laUN6JyvEHNK+/5v+KmgALuSMO4c30QcQVWe1f2t+d+BhI5O+4/WyiiWeIJOFuL6Zohd+jQ== X-Received: by 2002:a05:600c:42d2:b0:3cf:c907:a05a with SMTP id j18-20020a05600c42d200b003cfc907a05amr32777006wme.177.1669420481119; Fri, 25 Nov 2022 15:54:41 -0800 (PST) Original-Received: from krug (87-196-72-177.net.novis.pt. [87.196.72.177]) by smtp.gmail.com with ESMTPSA id x7-20020a05600c188700b003c65c9a36dfsm6037921wmp.48.2022.11.25.15.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 15:54:40 -0800 (PST) In-Reply-To: <7c34024e-c2b6-033f-ff37-a0fdfc9f0cdb@yandex.ru> (Dmitry Gutov's message of "Fri, 25 Nov 2022 23:57:51 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32d.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300532 Archived-At: Dmitry Gutov writes: > No, again, he just wanted to show a quick example. With pseudocode, > almost like. It was real, working code. The only thing that was missing was uniform way to take advantage of the new structure in the user commands to find files, grep strings and run compilation commands. Also, the follow-up message showed that it's possible to have the new logic and not use any internal data structures "from the outside". >>> The program that creates instances of 'vc' type is called >>> 'project-try-vc'. But we could similarly add a generic method belonging >>> to the same unit of code (called 'project-subprojects') which would >>> "belong" to the VC project backend and create a list of instances of its >>> type. >> Again, you are talking about project kinds already supported by >> project.el >> as its built-ins. I'm asking how to produce a project of a custom type. > > To produce a project of custom type, you decide the data structure for > that type, write implementations for all the required (and perhaps > some optional) generic methods, then create that structure. > > You asked, however, how to instantiate a project of a type belonging > to "someone else". But didn't explain why. > > In most cases we will say it's not a good idea, but when a practical > goal is described we will decide to either say "go ahead, it's okay in > this case", or, hopefully, suggest a different way to reach that goal > (just like I did with the 'project-parent' definition example). Or > rethink and throw away the whole design (hopefully not). I don't think it has to be so extreme. I don't understand why there isn't a user-callable construtor for a type of project that is currently represented by the '(transient . "") implementation detail. Demanding that the users of looking to add to project-find-functions additionally define a whole new type and all the operations to go with it is unreasonable, IMO. I don't think it's "throwing away the whole design" to provide one such constructor or a means to simplify this. Even better, provide a CLOS class, so that users may subclass it and use inheritance in the CLOS generics. Jo=C3=A3o