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.devel Subject: RE: [External] : Re: Declaring Lisp function types Date: Sun, 25 Feb 2024 17:16:43 +0000 Message-ID: References: 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="3965"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Alan Mackenzie , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 25 18:17:31 2024 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 1reI82-0000pb-IB for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Feb 2024 18:17:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reI7T-0001vW-6z; Sun, 25 Feb 2024 12:16:55 -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 1reI7R-0001uF-7H for emacs-devel@gnu.org; Sun, 25 Feb 2024 12:16:53 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reI7O-0003wT-TA; Sun, 25 Feb 2024 12:16:52 -0500 Original-Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41P7u95D030227; Sun, 25 Feb 2024 17:16:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=tln6phQi7YFH+QlutPmKUQUyxkSMDMyefb+AZmXHMqA=; b=E2JK/idGEqoQn5oR9dXeOGa0RdNHvSiu738GCyeYTEbXnCBjnXcCpPboOioBheJ9LmbR 3ZE17ZGXTvumgXTRWs6rmyqagtDCzxTYnRN9/1tX37vIiXBMDZmXRX7Z8T+mA29VfnC6 y9Q3K3ZPW8+QituLg9T6vwG4DldJxv3kjVVKhd3I/cqPSqjre/74l+CJwY8d2BTuZvnn 4XjDrZv6yDWd2Kuo4pz9c4Vvzusun+VTpaXKTnJgSYbBERX9jl8r5ieGWQVQA1IlguwL 6DDXKrK7Gix3V1y8hEDnLVQbSoGHhs+kGC78+3LEicE3v/zDLveFd2jLwe/JKNvMOjx3 Lw== 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 3wf8gdb1sp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 25 Feb 2024 17:16:46 +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 41PFK3PB040769; Sun, 25 Feb 2024 17:16:45 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3wf6w4ned7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 25 Feb 2024 17:16:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eUHxai71XVjBbrZIPJwN0zPyGkd2Qj64XGf6xpUs6Fbk8k59zwtSltgPQJ3XNZ2U5uQnZTs1bjDo9oTHj1vCmUaw9ZsOopCU6TQoz4InZ7KvmG41hSAvvUm9YfQFt2SETiT9OzO/UJkFI4L4oJ5m223UtilQpZHecgW3Q233ybuUboRUnK61NsYrRauheXp3iStu6U2idHZvkv2yynoTcPetd9OoRuW7YwsOjxuPncStUovF5xH7Fq18rgiATdu186a4MFf0duFpjsyfqYVXtk1mrPLffo9hlwwTOUvAxBfMX0M/xSm9MbvedRDbow/crWdp+GuR0sci+hC900kU4g== 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=tln6phQi7YFH+QlutPmKUQUyxkSMDMyefb+AZmXHMqA=; b=mvJNgAZsg/6uEqgCzkcrhSRNWMWdqzqRutspnDoyIxd8iC+rLhcJI95aRRZCafMZLu0yfMg77ibh/vtmQ3u/5EB2fYXh32bsfujAbq2uDbbKs0CX829WSe3v5uXwwo6ikVnqyO3J3hqQykayTWgn43LDSEoze7gD2akumXjUvlGR/k2mhnhVPUcELK4xvH7rK37EB2bHLj3zX3HeBPCTMfHEKEAPRv3OH7uJsg1f/ZYbxYXpB8P59CGA0rEwICz6YJhlwm3GQBUlLvDvIsVAC/HQLJrLqERN2FJzDx/XLLwb9x9T7ZvbBof5fvNcbAI+iQTeGDG4SVqeQLVTXE8vng== 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=tln6phQi7YFH+QlutPmKUQUyxkSMDMyefb+AZmXHMqA=; b=JS/QmbvCtdLXg2Y5udvzVpUKRau7zxuIBg/8USUzfPX06e3akLwUQZh33P5OfhrBe49rH08Nuf1llcnrZMFDIxyVmI1+6Bt2oIk31CebXvqQLxOONfTIA+Hab5TuOv2gx3ypz5TW19QY7zMRyc5iADvCUp5+kBCw42JmcoCDvJ4= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM4PR10MB6229.namprd10.prod.outlook.com (2603:10b6:8:8c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.33; Sun, 25 Feb 2024 17:16:43 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::d9bc:c5bb:7fc4:cf9f]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::d9bc:c5bb:7fc4:cf9f%5]) with mapi id 15.20.7316.032; Sun, 25 Feb 2024 17:16:43 +0000 Thread-Topic: [External] : Re: Declaring Lisp function types Thread-Index: AQHaaAzmfym3T0Pj8UKWKxiUsYWZ/rEbSrSQ In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DM4PR10MB6229:EE_ x-ms-office365-filtering-correlation-id: df97a066-8b0d-4285-1716-08dc362589f2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: i3wefiZa1hkzlJv1/od7gWhDr1qfqKo9jtbhznAWVVcOKx3objd9OAXBZVTm2yntEH0A7aIY+tc5nwFDZqWOpFGiii94JcVnBJKZkc11qqPQ9AVJwHe0F2/CM7RdrY5cEeVf5JpVvdA9ZvJ4duQvXlno5pHPwIsoEz26GJuPbppMSUJ7KovFmLbLTAfzgVW61w2zShsuATbupCzsQiykgF9u21UO/rlOT66qxxfroU5DuUeUP6YJhmyjz8RfFvoCtUm+PwJeeNUZxep92uHZYCUOZSfIQyus0K2/v81hYZ3qm4mj2lEoUF7K6JD3NDlg9vRF+48CdU/p2hTbAcBh/WVK9quprzBIgqv8Ly9p2HB80EywIxXVRYv1brBy7QLEBvwiwDuxcpEataZ0EjAePYnGSdVrRAyn3esAuycJSEqd2X93PIAY5gMRdnIemQw/WZO96JTa30FRnl91ld6U8AA9c2gBDFKq7x7ZiRI9lGQxxi3bfrCLhkhzZlPsJKrGWrX0vT36V/+A/+dIVZ/FnjDemcUynJ8kOTJLKsHlcidnKjtxsICH6ZOLWG6EUglvbUUHYsO8Le96Dqk1rYhC9nS9XECk8lrpZTCKy101P5Y= 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)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3lXp07pUIaNOeb6+7arTm7V7bE8dl+jeKbALNUcViCZhuZPyRlU5fD3TneD8?= =?us-ascii?Q?rYFSXTa/30LxZAlbRk9ZamxiBbFwCLhx8GUwXVxD6GjHBDFeFCeqg6mrOVFC?= =?us-ascii?Q?860bXIAyQAAbyaV67g+629UTST3+hYAszHkqRCqfPbeOw2JbZBfppcMVh68x?= =?us-ascii?Q?z641dpfAAm7LTcBvuoI8EYpDHl+7afgR6cavnZk0ns4H0Kd6MMpz3Zbn6Fa4?= =?us-ascii?Q?H1xpPzq1p3O63LZ72MesTtCaN0NbVi5rpm6LlrKN79C6xSXWaHxZdjc9g/92?= =?us-ascii?Q?LYB6zvOyQHT4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X+0BitEtgWC2gSOctN+p4eUFYNTEY/ybmsCEzn2+wFXMsWYSyJ53sBg= 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: df97a066-8b0d-4285-1716-08dc362589f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2024 17:16:43.5457 (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: cIXOpB4UQ4lWIzVrMNtbREiKjlJHWcgaH8LsD0HPbtEWTViLOcyBQprifmqJ0ra3Wdd5HECVEU7tzQhp+rfZYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6229 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-25_20,2024-02-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=789 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402250137 X-Proofpoint-ORIG-GUID: uaUBoqR5mfLL9ftbbEe0Ps2a9fmwIULB X-Proofpoint-GUID: uaUBoqR5mfLL9ftbbEe0Ps2a9fmwIULB Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.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_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_DOTEDU=1.999 autolearn=no 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:316534 Archived-At: > > In principle I believe we are interested in expressing the the > argument > > types and (maybe optionally) the return type. >=20 > What's missing is the why. Do we actually want to put function type > declarations in Lisp source at all? They will clutter up the code more > than it is cluttered up at the moment. >=20 > A ground principle of Lisp is that type checking is done at run time, > not compile time. Your proposal seems to be changing that, although I > don't know what the intention for using the type decorations is. >=20 > I worry that these declarations will become frequent, even pervasive, > and then effectively compulsory. Then we won't have Lisp any more, > we'll have something more like C. >=20 > I think somebody said somewhere that the declarations will be > "voluntary", but things that start off voluntary have a nasty habit of > first becoming pervasive, then all but universal, and then compulsory. >=20 > As I said, I don't know what these declarations are for, but I think > serious thought should be given to not implementing them. Hi Alan, This comes from Common Lisp (if not older relatives). Please see this in general, and in particular about declarations being voluntary, and their purpose(s): https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node103.html#SECTION00130000= 0000000000000 In particular, the intro paragraph tells us: Declarations allow you to specify extra information about your program to the Lisp system. With one exception, declarations are completely optional and correct declarations do not affect the meaning of a correct program. The exception is that special declarations do affect the interpretation of variable bindings and references and so must be specified where appropriate. All other declarations are of an advisory nature, and may be used by the Lisp system to aid the programmer by performing extra error checking or producing more efficient compiled code. Declarations are also a good way to add documentation to a program. Keep in mind that Common Lisp is not a particular implementation. It's a spec/standard, which particular implementations can support/implement in different ways.