From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Sat, 2 May 2020 15:51:45 +0200 Message-ID: References: <831ro2tqqx.fsf@gnu.org> <4a1fd3f4-df92-c756-9874-4d07b54148ac@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cdd49f05a4aa9a37" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6487"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel , Stefan Monnier , Richard Stallman , Dmitry Gutov To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 15:52:51 2020 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 1jUsZX-0001aZ-1y for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 15:52:51 +0200 Original-Received: from localhost ([::1]:55376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUsZW-0001Lw-3m for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 09:52:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUsYy-0000m8-Gh for emacs-devel@gnu.org; Sat, 02 May 2020 09:52:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUsYy-00026O-2G for emacs-devel@gnu.org; Sat, 02 May 2020 09:52:16 -0400 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:39112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUsYw-00025q-Ka; Sat, 02 May 2020 09:52:14 -0400 Original-Received: by mail-lj1-x233.google.com with SMTP id u6so5173234ljl.6; Sat, 02 May 2020 06:52:13 -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=I1eyQNXOLKmZvbMD79Z8SA7/+aWa8x76E304b5yHe8M=; b=fpcPhkNnODCrefabHfISYfM2++W72FL2F7W+1jO1Sv0Zdc2hanBurNecYk0P1xgs0q efHndUnRVDyEbjY0Q7cW+zg2656B/mQLvVW9q750ncZAInNs2kCiF6pdze79L5C9FUd5 HCQnIQHUoAyDd2AHYGmz6CaxEoWw7Ec161tY6ojc47ZdKN8XmBPqpfF3Lpho8X2emRF/ OR7ly2183RSwDalJyXWEAyl9M2OlJe2cXLe2lzQOSzXXtdPz0hcJoGVcFiM70GrWzg6e jpceQ+HugSEZT2kMgrb4YlOkU5MkEs9H8FLLrgRloGkp04jRMQyWkJjxjSfr7KFe+eAY HCsA== 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=I1eyQNXOLKmZvbMD79Z8SA7/+aWa8x76E304b5yHe8M=; b=t/kijJ/lqhjZ63Ypk2BsU1YsJwECMBE/T9jKWWyMxLijWQDKtxIEfbr3lVQw1GFKEu HiJImWIFys9No11gVDEQ/i/r6+DHoWFQ5sRzRFStoFsgbD+LbTQG08PYSP1m9hJVbubU 3HV0/oMzQXklDRn9w78X76pKOZsdn1yJ11xAohiL6k67xzDltq5EKQGiVZ6AXxH5SqLy NkT/YnnXAi8czsakz+6mgHqagpTtoknePT8dcSS/ADHkeijkKtG3NVoV5X1134I9BjmD Pa5xnsDpmf7EfPcH3WTR4KgMRfmB/hq5kdY9kK/BHMjAzzsQl0yFCIa8HQnitK0FMIXU eBSQ== X-Gm-Message-State: AGi0PuY1juHiOVyHzcug03tCNj1Ch/xM5TaWNnzb30LbHLkSv7VXEvGF pWXo3Un9pwpxE7wIkb/bI3qhBCs7Xcy3nXtjrQQ= X-Google-Smtp-Source: APiQypLGvYi0fyLZwuYgjjb5Kqf59CT+DJm67iueWw3pKYyJF7osiw/RDWCLPnBuucGgD6Y1xEHrEip4cBw0Kx+KprI= X-Received: by 2002:a2e:700e:: with SMTP id l14mr5311970ljc.135.1588427532127; Sat, 02 May 2020 06:52:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=philippe.vaucher@gmail.com; helo=mail-lj1-x233.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:248439 Archived-At: --000000000000cdd49f05a4aa9a37 Content-Type: text/plain; charset="UTF-8" > > > Let's please not use the C library as the example of good naming > practice. > > I bet you'll find people that think it has the best naming. I kind of like > it. > Of course everything is subjective. But if we take "clarity" as one factor, then "string-copy" is better than "strcpy". Of course we can argue that "string-copy-from-one-to-another" is more clear, but then another factor comes in which is "prefer shorter names because they are less verbose". It's all a balance between clarity, usability, discoverabilty, etc. I tend to be on the side of prefering code that looks and read easily while also being not overly verbose. Code you can read in 3 years and still understand it straight away. I understand others don't. I come from C/C++ and in the beginning I liked these cryptic APIs, with all these corner cases, complexity and microoptimisations. When something simpler came along I was pesting that kids these days have it too easy. To me this is just a form of stockholm syndrome :-) Nowadays I'm much more seduced by elegancy, clarity of intentions and maintainability... reading code where I instantly know what topic we are talking about seems like an attractive property to me. --000000000000cdd49f05a4aa9a37 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Let's please not use the C library as the examp= le of good naming practice.

I bet you'll find people that think it has the best naming. I kind of l= ike it.

Of course everything is subject= ive. But if we take "clarity" as one factor, then "string-co= py" is better than "strcpy". Of course we can argue that &qu= ot;string-copy-from-one-to-another" is more clear, but then another fa= ctor comes in which is "prefer shorter names because they are less ver= bose".

It's all a balance between clarity, usability, disco= verabilty, etc. I tend to be on the side of prefering=C2=A0code that looks = and read easily while also being not overly verbose. Code you can read in 3= years and still understand it straight away. I understand others don't= .

I come from C/C++=C2=A0and in the beginning I liked these cryptic = APIs, with all these corner cases, complexity and microoptimisations. When = something simpler came along I was pesting that kids these days have it too= easy. To me this is just=C2=A0a form of stockholm=C2=A0syndrome=C2=A0:-) N= owadays I'm much more seduced by elegancy, clarity of intentions and ma= intainability... reading code where I instantly know what topic we are talk= ing about seems like an attractive property to me.
--000000000000cdd49f05a4aa9a37--