From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.tangents Subject: RE: [External] : Re: Shrinking the C core Date: Sun, 17 Sep 2023 17:16:58 +0000 Message-ID: References: <87cyyje7hh.fsf@dataswamp.org> <871qezdw6a.fsf@dataswamp.org> <87h6ntcdt5.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10542"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , "emacs-tangents@gnu.org" Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Sun Sep 17 19:17:37 2023 Return-path: Envelope-to: get-emacs-tangents@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 1qhvOq-0002XU-UB for get-emacs-tangents@m.gmane-mx.org; Sun, 17 Sep 2023 19:17:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhvOY-00021X-Pt; Sun, 17 Sep 2023 13:17:19 -0400 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 1qhvOV-00021G-DA for emacs-tangents@gnu.org; Sun, 17 Sep 2023 13:17:15 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhvOO-0004qj-Uk for emacs-tangents@gnu.org; Sun, 17 Sep 2023 13:17:14 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38H5gxkU026549; Sun, 17 Sep 2023 17:17:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=ZawzPbGW4zuYOYpsjxDdHVewFVHzjdZ6zZkQvO8Kqjw=; b=33A2/ViQftncUHz0P0SGhgh+WMc1JkrSVSDrewxOQPBX2ZTtqlEODWI7L7g64Rr3Bw8e IOAeH/kg3cYt1c3ke7tPNaQxTmllw4/oRhwuVf/zVir+xZroJGELF2hl/JS7DA19iD5b v8guXW9t3iEtLRG0vFD0v5g83FkqCxHwXi6fZEsVi2mExpCCIiXVajrmta9GfEVBJenC MTrU0gEXbfTPlgVmjsKqTi5uOFUp+wSZZ5BNlOI+786gO/lCLNM+7JbzexRutiwixoEt j7gHB/MEB1sWceb0WEPm0YA8qhpXEu/JUestT4N8uo8PmGPmGdLJNT4NWvtxKm/LR2/f og== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t54wuhbw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 17 Sep 2023 17:17:01 +0000 Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38HH1bYW027126; Sun, 17 Sep 2023 17:17:00 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3t52t3tdq7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 17 Sep 2023 17:17:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2YX/WoAqRJjMqk66pcf0sTh5+gxT8J1KydcHQ7hVawuENV6pR7/CK5U9aswpayNF5GVxySqnR5Zcn1U+UgHr784FYQC2ruaHVJIDaYkZntekW5YPD8lvQo1/XFxYYlFsj9U6Y06bFvtyXRcRb6oHTVXlsGzPnLv+V1PWP1IlekfTVhvLOh2wUSA3mKsxJTuCb7Klnt5KrwCLaWCa2IFWjurhPP7jYG+WeyeOv+GOEdZn36DAFV3Uz8lZKjYluWOgphh1BN37bY9cC/u8bKEAdkjrn0Zuk0F4V5zp3StJv3jYKcArqfiV3Wj5fPuycWIvplk+Vi/XMEkqPonEoa5xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZawzPbGW4zuYOYpsjxDdHVewFVHzjdZ6zZkQvO8Kqjw=; b=XMc0MivaCcHWa54GkTPuyNFpqWyCE3tsmc6pxbfAmkzg0x61/G/E2CYlwJBtskoEpgXn1gdogr2CxsiR6HU9dPi6ZRw+rIAzNLrvrJjqcIKkCRi0UriZWMmA79fLyPJVzp2zW9mdGXESjfPN2hJJ2NrH2hxkv12k0qq+nzngVYmnsInkFJbNFyT/OcukmC+Nz4d9eQEyHKOkRdxuItOM9xpXAYvND1u0jKwxHl7Jrgh1mTeq14eSaZ+FTw+2kDiKMTuzTc+Ynzo+wYIWDFb7j0ONvJ455jzIm1bgAEvGeB4WwbNkLYTdohaKYhNGEbhTAh8mFNH8ypb41O3V0Gv/kQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZawzPbGW4zuYOYpsjxDdHVewFVHzjdZ6zZkQvO8Kqjw=; b=APMkfr7Kv9WPGac7Cw32JCccut9BJVJFTQ+z5EcCphLrSe/V04Nyl/67bAQX5hRS6QdaCjLzd+s/1ZvOMXZhwxNgG4h1RT8xYfuztfO+YNrwMAW4E51xkeOwrB1dxVq7QQWYDqBi9R35/+Yr6hCPQJR6u8EB3Tj8oexN0d3BCPA= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SA2PR10MB4618.namprd10.prod.outlook.com (2603:10b6:806:11f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Sun, 17 Sep 2023 17:16:58 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3b:c5a0:5222:69a4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3b:c5a0:5222:69a4%7]) with mapi id 15.20.6792.024; Sun, 17 Sep 2023 17:16:58 +0000 Thread-Topic: [External] : Re: Shrinking the C core Thread-Index: AQHZ6VQyE28g0jxlgEOR+gcvo91VWbAfM5yQ In-Reply-To: <87h6ntcdt5.fsf@dataswamp.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SA2PR10MB4618:EE_ x-ms-office365-filtering-correlation-id: 8f7d21c7-da67-4c48-c2ef-08dbb7a1e628 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1316aRuHmGf3Y+AsPorZwvezQoH8qMUWiKlu/QtF30G4zXlcOzvFq1s7TZPG0/hUFAHLY/k9vK3AeT2lucHnqR055vdKWq/jg9brIFdwuNhROuCobTd2ZhVLv7BQod3fT8QkAPspKCrpPKAHE0qJD3kIGlRcVXMOojDJDnNwq3MXAA1E1EduRn3zjwxF/jLgdRBU0DryPkhJkiBdo1L3Fbw6bqrcVftM/+viAp9SgC6o1KaDcnayygjEdIgutMvzORv19iKpxj2K0JZ50ag0dog5uS5f+c8pda1ZvWahGA0s3rzVZEF0TvSuYI5PU40FVLrrwpEk45zMrVOvT7xua4Y8E+WegVhFJ/SB9z02FmgOv98PlYh8t4ontKXirj1QG0p5m2Pio1KgR3XnH/J0iyHjMHFyxXjEAqI53Ts4CutxCJaeSnSNAldCn6WEKpbHxgnb+f7r9Ty+Uc0EqFbceAW0zztlAusH7dD59rpgkkukf8jQVQQt62pFUGtQUEokkIJnU/gB4Y0AJqKyvZfe3Fsp55Fj4DnyFNGKwUkMpbEYwcvb4lHZg6lhFIkcMcLtvCiDVAOtK3POE+kktg2hPyL+FerI7gJM9tfxDfvbH5M9DI597gPs6norC5tcTEZk x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(376002)(396003)(346002)(136003)(39860400002)(1800799009)(186009)(451199024)(7696005)(6506007)(9686003)(71200400001)(478600001)(26005)(2906002)(44832011)(66476007)(66446008)(76116006)(64756008)(66556008)(66946007)(316002)(110136005)(8936002)(52536014)(5660300002)(8676002)(41300700001)(86362001)(33656002)(38100700002)(122000001)(38070700005)(55016003)(66899024); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Tf966T5VNyhIhTPyIrIwHhlw40s3x0y+WslI93jDbuQXC8uuKfghz8DASdZ6?= =?us-ascii?Q?1oXkmL9V2k1IDy+sdS0dTijqlDwfL6fAfRCG9QiGrahMKnc+HqrI8A8Eqr5g?= =?us-ascii?Q?r+uWvQ5P4jk0nShGJP3ATwg857CAuJ1d+XH1E1pPrAhGGPXwdYWA9kJU6Sgm?= =?us-ascii?Q?Sqwga+uXd2aX0/IqqcSVV1MoKGFoxJq1Hrw8NKMSSAXuCW02Ly+9VCcdGu3v?= =?us-ascii?Q?eoQe3IPDD+tcojNfOKZ9P+sBFiw3OZs3NCNMcCK9irlQqBEH0G38S8BJRzJl?= =?us-ascii?Q?j0OSLiwheQHRCWSTRY4NTa87R5VjY+1+OnSQTutB1WXfodLxhLT/rIuOMeQs?= =?us-ascii?Q?1VXFhJVenGiMJdDy96uH2JNkqMLyjLNfsimn2T4Ft015IMZjGwDQp/s5rmuO?= =?us-ascii?Q?IslRQFRXQ2MncB4r/+vuZfFl4JoEml3E/kP5b2Fy/ytV3Mhtj3AozVJ+KqN9?= =?us-ascii?Q?nTITmK49d3jAGTW1F5wExk4YQn+PZB957khHbfKRH9f1AFQt9+CrFfGiQAHP?= =?us-ascii?Q?lRSlTjzH91ZxY+idONSCesBDqXZcCMnxYk4DFlXQc8eQ6hIFyAr7QbgW698Q?= =?us-ascii?Q?ICMTr7HWmX/3od7tbbKxh3uI8wOfQGWxkCT+uCXOq8/scMghVaqGvHeUdtHP?= =?us-ascii?Q?io X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: kiF0Ntxsy562R83PM4+5S/HBJ8rucB6zzCJZdFlrnrV3VawQ1b/Uu+MHiGfRdo+g9LLrlr1CFUW/IR/fuY0lrGurL4jvpNInv3QzBLFIdMU4Yv0rW2aE4vRtN3MFBrgEec4IdYMux6SoWV1rd7LBJzpY9gS8t9TRpO8OcNcsCOs38lXoLSqQ3TN7Y+8Ww3MJi96b/uf50+Yl0SrBTRED558sRGHnaoJ4k//bqmFLCoCdVR3hGtHzyqp9fAB4CaMeiMbClLnLVMrMA89NwJB+nMQXEUp/bXuIXkZjEj2zOPP5phlxI8DEK6t3PCbLNoIXdNIdVIm+Pmz690CNlc2umM+dvjEbkAeUj9oJv5QBsA5nZRc0EZHmnYJubToXcQ8BZLafUeuHHSpN/xiulE+9JoKXgK4cM48U/MfravRw1yebzn7ONUEp3kWT1UfsRICYnbtZyfjBS9D38FjpwjNFCL6BQQfj0flOxITcLkc/5oGAYsNa1Ckiay4ocHG2QSPEL7VQHi5QT2WZaztSJcVk/QYQIGSdmmiS2atwLH21Qw8Vtw4P+yaKwrovXPXLnvk/MiPnyIzSrtksWJ5Y+UGuDchhdg6PqNwsP4+YDPGnuAwK3pf83IVLL6vqOpkYnoDerNb88V+/OJzAewKdeF/ztKD/TpKKiqJAJx7WjL3T7nHrXWnDFlVsOOi7IrBXXKnooj2r20vKYaQ10M2QuIVU+63vQNh/xyRxKolPJGB1RjMKv7 XidjXzxNBuPtNryTGeUhgMVMX+U7k8XiP+CtaWCQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f7d21c7-da67-4c48-c2ef-08dbb7a1e628 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2023 17:16:58.1802 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LJI/pidI/1PSvTvv0k9ek+eE5BC4T0UGv4dK/jSu2Chr7zDz6WOoCIDvXY2XmzkJ/xN5UlGAebyQu5MupTdYYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4618 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_20,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 mlxlogscore=244 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309170159 X-Proofpoint-GUID: TuCEH-WrogPSs1PmGFfuUswKm5LIgtbA X-Proofpoint-ORIG-GUID: TuCEH-WrogPSs1PmGFfuUswKm5LIgtbA Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tangents:1100 Archived-At: > Many functions that each do little are easier to see than few > functions that each do a lot, because with many functions that > each do little, the function names are often enough to > understand what they do and how they work - and they require > none or very little documentation. >=20 > But with few functions that each do a lot, one has to check > the documentation for each function, and the documentation > will be huge, because few functions that each do a lot either > have to have an almost endless list of arguments or rely on an > equally long list of possible keywords to control > their behavior. >=20 > For example, (+ ...), (- ...) etc are preferable to > (arithmetic :operation 'addition ...), > (arithmetic :operation 'subtraction ...) etc. You continue to ignore this in your posts: The ability to have &optional, &rest, and keyword arguments doesn't prevent anyone from _not_ making use of any of those and instead defining 8000 separate functions (to further the exaggeration). Do _you_ ever use &optional or &rest when defining functions? If so, why, since you apparently have a blanket rule that using multiple separate functions is always better? =20 Everything you've said against keyword args (even just allowing them?) applies equally to &optional and &rest. Should they be outlawed or deprecated? Please answer the question: do you define functions that use those? If so, how do you reconcile that practice with your claim that it's always better to define separate functions instead? Why do you use (defun foo (arg1 &optional arg2 arg3 arg4)...) instead of these, since you argue that these must be better? (defun foo1 (arg1) ...) (defun foo2 (arg1 arg2) ...) (defun foo3 (arg1 arg2 arg3) ...) (defun foo4 (arg1 arg2 arg3 arg4) ...) It's a no-brainer that: 1. Providing the _possibility_ of using &optional, &rest - and, yes, keyword args - doesn't _oblige_ anyone to define functions that use those. Such arguments just _allow_ you to define, and users to use, a function that takes the place of multiple related functions. Or that serves as a helper/workhorse, to _define_ multiple related functions. 2. That provides a place and a name for the family as a whole, and a place for their _relations_ to be set forth explicitly in doc. You get not only individual views of particular trees but views of tree communities: particular forests. 3. Keyword args let users use fewer actual args than when &optional args are used - nils that are only positional placeholders disappear. 4. Keyword args make clear what the intention of each arg is (it's named!). Contrast that with having to consult the doc each time to figure out what each positional arg means. When calling a function, both (1) the need to stick in positional-placeholder nils and (2) the need to identify a keyword arg by its name make function calls more verbose (an argument you could have made, but didn't, in favor of not using &optional, &rest, and keyword args). It's a tradeoff, for not needing to define and use more functions. When defining functions _you_ get to make that tradeoff decision. That's the point - the language doesn't decide for you, by offering only one possibility. Lisp says, "You're welcome!" If every function had no relatives, you might have an argument. But if that were the case then no one would ever define or use &optional or &rest or keyword args, and those never would have been added to Lisp in the first place. (BTW, &rest is essentially just a shortcut for an explicit list argument. Some languages make you pass a vector/sequence/list each time, even when that's empty: [], "", ().) Finally, perhaps the most common uses of &optional, &rest, and keyword args are for defining a family workhorse function, which is then used to define other functions with fewer or no such args, which serve particularly common use cases. And often the most common use case, even for end users, is just to call the workhorse function with no such actual args. IOW, the "family" function is often, maybe even typically, defined so that it can be used as is, with no such args, to provide a useful default behavior. Thus it has been, for decades. And thus it will continue to be...