Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110281 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20072 invoked from network); 26 May 2020 18:28:01 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2020 18:28:01 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D274E180550 for ; Tue, 26 May 2020 10:08:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.64.0.0/10 X-Spam-Virus: No X-Envelope-From: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073068.outbound.protection.outlook.com [40.92.73.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 26 May 2020 10:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gnEOrE9XjMF1tO8SZuyNVgvqBNTuwqa0MgGNzcbCpIyL3vnUVBUFGGflDGIbDRi9lWH97/dLZM9LzbyNR6/Z3SVxCOwnaUhG4Qaq1Ngnzpk6A3yi/lvAdW1oFdXKqXbA5gXiq4qo0dqvTjwwRgkldgYjVlhLE1CbSzSKvnRFB7m2n1+fXD8kq011DK70mAlcgUiu0SktLD4uCkC0dm7x1s0Zjtvy8nSx68zHsNCOmumbDYeApGBNOG4IdrZnhiC3xthkayNSRTl0ykTAda1JZq5wiatbeTpXhXyJ4/E46ljrL29DBgNMq2pJ8M+AYDZ3oOTrxxcHCIBcm9JVSyiubg== 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-SenderADCheck; bh=pkRq1By2aytO4LwRtA8grjRCwLrMEmrDOyRHRFDWspo=; b=dZtqto7krEsS6hGRd69nThbN8P+eCFqQme4XU7tFNtG8rK872wJkLmnPFkMOXerOMk3fSLtOXQ862Go1koI1odvmkdwMFNarg+fjBQxESdUNPTxOxMz9gsYR3OM1A6Pg/2+xCRFbqBVapwWhtlCdVsBXJVqu1QK/B0lCUc1ztvgC7ki+V6WTlm1zp9nCrXIq9wEkF3Nft1MWfB81gIcxJUu1ceYNTy/3mkouXqim/DDnwgdUscnQ3l5t4R980uRsvWQII0A3ldmgqocpxL7iNBsK/E0W3WllQmkAbvXNygYQFzeAIy2Szg+Vvkypq5yUqQjYD5sGkBwFHIHO+o9g+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pkRq1By2aytO4LwRtA8grjRCwLrMEmrDOyRHRFDWspo=; b=prVAEc5e0Bi40aj/v9UUCYKcj1Gf9Dky4iSMiTbnqW/xOk8cd5M/vPtBbr/BhnJOrZK0epDGRYYhLqfDf69l+7sVsImvKcBHPkUkvdWlJiKG5YqcK43Bouk1QEyCDScoKwYfAFqYZm+6JrrTWzcRGdKiJOBSFLYQtkRLCXFpxhPk6p6VEZgzHEsmBWzi0atQ/NeLMKgVSDYdamJ+0qRwqddQY5UGy0prL2W6xOU2iMz+MNiNKNE4tm88FDsMlF54e1jZxV2Uy/6inB9so5LNJbNBTGji6qZHjSEPUIb584KI0q+DjiRx6P3Zr7nc9pqgbbX6IUhPZC/74DExKZZNeQ== Received: from DB3EUR04FT057.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::51) by DB3EUR04HT101.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::342) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Tue, 26 May 2020 17:08:07 +0000 Received: from VE1PR08MB5261.eurprd08.prod.outlook.com (2a01:111:e400:7e0c::4f) by DB3EUR04FT057.mail.protection.outlook.com (2a01:111:e400:7e0c::125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Tue, 26 May 2020 17:08:07 +0000 Received: from VE1PR08MB5261.eurprd08.prod.outlook.com ([fe80::211f:62ce:5fbb:5289]) by VE1PR08MB5261.eurprd08.prod.outlook.com ([fe80::211f:62ce:5fbb:5289%5]) with mapi id 15.20.3021.029; Tue, 26 May 2020 17:08:07 +0000 To: Dan Ackroyd , PHP internals Thread-Topic: [PHP-DEV] Draft RFC callable types + callable type/function autoloading Thread-Index: AQHWLqa4wyNx75utmEG6bkmF8L9f7ai6nJyq Date: Tue, 26 May 2020 17:08:07 +0000 Message-ID: References: In-Reply-To: Accept-Language: es-ES, en-US Content-Language: es-ES X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:1CCB0A367E44B8EE9589F0A5E83049549EDF3D44AF69EC5936E86F6895924D8F;UpperCasedChecksum:0B5281760E45EDEC250282565D34E89C654C965745C86DF2F5FB5DB00CD34A64;SizeAsReceived:7052;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [ba/TlwhZQNxsBIEFOH/U2Ttc/zcMAny7] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: f950c86e-5383-4cf7-884a-08d801975c4d x-ms-traffictypediagnostic: DB3EUR04HT101: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: u7lXxJ0Er2kQa0CQxR4F/GbcKM5/t/bZSnHQCdOnZGBUcRHK/CBkC/ppGLrGckJ7Z6GiUwZRSesXpuzpPsuGHAIkNZJcu5XrWPilczcpNhtIqJK8mLszStfsIPkRwVOvDBun6VkSy5e5SnC0uPIGGnbZloUZ/kFcaJs6v0g5aJW0aflwI792CRKGotLSAG0vMmeD4nQ2yfxahTf1Pji0CV77G0BfjrimhtkCXxDHUXQEb0lOJ/av+za9MAATfR1E x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB5261.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: yjFVZBT1IBmNK/VHHBYdz5/u1W5GVKmFtJKMI67cabzH+MSDVzYXWzmVuMw89SJXGFNHijTl8yYoGP5OY9ysSa7Xs5AhwUEBVaOmUmzEmG84uemLD6kTS3aTaukiGkHxOxebmSlnjN4lC3TzDysgrQ== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_VE1PR08MB52611174C69F2F00C15CEA74B8B00VE1PR08MB5261eurp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: f950c86e-5383-4cf7-884a-08d801975c4d X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2020 17:08:07.2370 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT101 Subject: RE: [PHP-DEV] Draft RFC callable types + callable type/function autoloading From: txigreman@hotmail.com (=?iso-8859-1?Q?Iv=E1n_Arias?=) --_000_VE1PR08MB52611174C69F2F00C15CEA74B8B00VE1PR08MB5261eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Hi internals, > > A while ago, I spent some time thinking about callables, and how they > are not very consistent, which makes people sad: > https://wiki.php.net/rfc/consistent_callables > > The reason I didn't pursue that RFC is that although tidying up PHP > core to be more consistent would be nice, it would be a large amount > of work, that wouldn't dramatically improve the developer experience > when programming in PHP. In fact it would mostly just break otherwise > working code. > > What would be better would be an RFC to make callables be more useful, > specifically by allowing you to define the parameter and return types > for them. Making it possible to autoload those types would be > required, and function autoloading is also a feature that has been > desired for a while. > > So here are two draft RFCs: > > Callable types > https://github.com/Danack/FunctionTypes/blob/master/1_callable_type_rfc.m= d > > Function + callable type autoloading > https://github.com/Danack/FunctionTypes/blob/master/2_autoloading_part_2.= md > > I'll leave them on github for the moment, as it is easier to do PRs > and track issues there but I wanted to gather initial feedback before > getting closer to the RFC cutoff date. > > I'll move them to the wiki and formally submit them for discussion > when the implementation is closer to being done. Hi! Just a Little question. I see this other document in the same repo: https://github.com/Danack/FunctionTypes/blob/master/3_referencing_functions= _and_callables.md Are you planning to also raise it? As userland developer it really bothers me to type function and method name= s in strings. Thanks in advance! Un saludo, Iv=E1n Arias. De: Dan Ackroyd Enviado: mi=E9rcoles, 20 de mayo de 2020 15:01 Para: PHP internals Asunto: [PHP-DEV] Draft RFC callable types + callable type/function autoloa= ding Hi internals, A while ago, I spent some time thinking about callables, and how they are not very consistent, which makes people sad: https://wiki.php.net/rfc/consistent_callables The reason I didn't pursue that RFC is that although tidying up PHP core to be more consistent would be nice, it would be a large amount of work, that wouldn't dramatically improve the developer experience when programming in PHP. In fact it would mostly just break otherwise working code. What would be better would be an RFC to make callables be more useful, specifically by allowing you to define the parameter and return types for them. Making it possible to autoload those types would be required, and function autoloading is also a feature that has been desired for a while. So here are two draft RFCs: Callable types https://github.com/Danack/FunctionTypes/blob/master/1_callable_type_rfc.md Function + callable type autoloading https://github.com/Danack/FunctionTypes/blob/master/2_autoloading_part_2.md I'll leave them on github for the moment, as it is easier to do PRs and track issues there but I wanted to gather initial feedback before getting closer to the RFC cutoff date. I'll move them to the wiki and formally submit them for discussion when the implementation is closer to being done. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php --_000_VE1PR08MB52611174C69F2F00C15CEA74B8B00VE1PR08MB5261eurp_--