Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125501 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 97C3B1A00BD for ; Wed, 11 Sep 2024 06:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1726037868; bh=932Srp7h/sPxCBq+dlId/G0YEAEzKFThKYwR3h8Gn6s=; h=Date:From:To:Subject:In-Reply-To:References:From; b=dkWXVuMQ6itwg6QiX58wt2eCnTPP7BeWkn6+/ZXlONAGwNAVgBWGwC8Gyb+Qr9hWF ufeoR5Z+mLuMMiQzZoBUNNdaYQoqrhp1P/QdeE8oNYKa+cPMejX0J+qOHC2YQnNZ9c yO9ER5BtyULQ9Bv7g2Un7zWtvOnMA4Q0u2FZg2hWq0/mHhZgTrEvZ351PCHzlHujla VE7suoqZ/lgaTg8iyKV9mNIGHKDfhDQ2duGo74m07rQ+57E3ajDBBudccsAynF79tm D6URlquXBMdTx32WnZ0kIcWe7hDOW+ebdViIlu4XWd62xJ96LMp+6RNE7nkEKH+ynM yryMf6mIScx9w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C3CE2180059 for ; Wed, 11 Sep 2024 06:57:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 11 Sep 2024 06:57:47 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2B2DC11402F9 for ; Wed, 11 Sep 2024 02:55:45 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 11 Sep 2024 02:55:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1726037745; x=1726124145; bh=PvA2LpQwoR7GhlHiHG/DJFSpzJ+LUFB+V6elBoKLJ+s=; b= CMa+tfLHIn7CKWEjLLjz7SllXE2DP3gVqIF9o6IsYQ7H/EZXGTIInM20dpsdIlx8 bSL2fzROA35an4wPT8L7EGlfFFhQ9k3eMk6wQnzqFBNa2HPcgXyJkCcg6SOLIdvm 1j0tO9ljx2rpQyJPOs+sl7wMUo2Pl5Xn3jTSnsHQEpAbesXq1vxFBr1Bi7IvqoOE gdzZjTDFLT20AOVoMD8vJPKvkRdqWWuKKFDyGkQX/ucpA+GHNSyhtbgjB71y8JxL RXANHDxB7CNISUooUk3KdriXKSJL4yk8Soa+4IH+z9xzlNgQ84OSIP2/kpWi9x6r LnSxu7nqH0hJlBF+fgorrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726037745; x= 1726124145; bh=PvA2LpQwoR7GhlHiHG/DJFSpzJ+LUFB+V6elBoKLJ+s=; b=h 7DXLc+CUmOMViUx99/70ms41lNfJw3jTevDeiF8ClXkM0WIML+akSbSErXQuzaWF VUbRiK/AzYA7ojPG/QfiTW0OWh4YBH/3vvBqwAV3DiU9xZRucStAiYh+3j9sYlng kgWQV9vlMvzvwv6wrau98qg9rKlxBevAoitPx3jUg67J5HTsvuvsmSzfJ1ooAAOq KlXPpQZy5uAY7NVuRCDkrsZMoCtIaVBQ2lHTW6fIFMUIkFmIYsRaO9DB4A+rDbrC Y1/5HJo/ZBC9XHt/WzbqNRjEbiJ3SLSIB3TKK3UmQsxmPMZmBwcqW6BmizgVE3Ad 43aLjqq1oPBrIleZEAaXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejtddguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf fufggjfhfkgggtgfesthhqmhdttderjeenucfhrhhomhepfdftohifrghnucfvohhmmhhi nhhsucglkffoufhorfgnfdcuoehimhhsohhprdhphhhpsehrfigvtgdrtghordhukheqne cuggftrfgrthhtvghrnhepheelffetiefgveduteefudegtdduveeludegueegleehiefh hefgtdekveevgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdruhhkpdhnsggprhgtphhtthho pedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlih hsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 11 Sep 2024 02:55:44 -0400 (EDT) Date: Wed, 11 Sep 2024 07:55:41 +0100 To: internals@lists.php.net Subject: Re: [PHP-DEV] Zephir, and other tangents User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 11 September 2024 03:57:23 BST, Mike Schinkel w= rote: >If you've gotten this far and we are still in agreement then I was lookin= g for a way to make it easier to add operator overloading for classes to be= added to core=2E So your comment "to reduce the difference between what ca= n be done in extensions and what in PHP code, rather than planning any new = such differences" was really presenting my argument as apples when I was in= stead discussing oranges=2E Though I can certainly understand if that was n= ot previously clear to you, hopefully it is now=2E Perhaps you're unaware that classes in core already can, and do, provide o= perator overloading=2E GMP is the "poster child" for it, overloading a bunc= h of mathematical operators, but the mechanism it uses to do so is reasonab= ly straightforward and available to any extension=2E I've never liked that approach, because it means users can't write polyfil= ls, or even stub objects, that have these special behaviours=2E It feels we= ird for the language to define behaviour that isn't expressible in the lang= uage=2E=20 It also risks conflicting with a future language feature that overlaps, as= happened with all native functions marked as accepting string automaticall= y coercing nulls, but all userland ones rejecting it=2E Deprecating that di= fference has caused a lot of friction=2E >And for those things were PHP is not great =E2=80=94 or where we see foot= -guns so we explicitly do not want to add to userland =E2=80=94 it would ma= ke sense to enable PHP to be extended through other means=2E And *especial= ly* in ways that do not require being in control of the server PHP is runni= ng on given how ubiquitous managed hosting has become for many who run PHP = apps=2E This is the tricky part for me: some of the things people want to do in ex= tensions are explicitly the kinds of thing a shared host would not want the= m to, such as interface to system libraries, perform manual memory manageme= nt, interact with other processes on the host=2E >I discussed with you privately several years ago how I thought supporting= WebAssembly[2][3] would be huge boon to PHP, and at the time I seem to rem= ember you barely knew about it and were thus dismissive=2E If WASM can provide some kind of sandbox, while still allowing a good port= ion of the features people actually want to write in extensions, I can imag= ine that being useful=2E But how exactly that would work I have no idea, so= can't really comment further=2E >> The overall trend is to have only what's absolutely necessary in an ext= ension=2E > >Not sure what you mean here=2E I mean, like Phalcon plans to, ship both a binary extension and a PHP libr= ary, putting only certain essential functionality in the extension=2E It's = how MongoDB ships their PHP bindings, for instance - the extension provides= low-level protocol support which is not intended for every day use; the li= brary is then free to evolve the user-facing parts more freely=2E Regards, Rowan Tommins [IMSoP]