Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126786 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 E5BAB1A00BC for ; Sun, 16 Mar 2025 16:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742142969; bh=JkdmcxBaaS3p6PvSiWcXlLke2cTf6r5uuv+EAhxULek=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a90872Tk1GZKUFQ0bXmP3aLRR0YaA8Ha13JN57n7O0x7t2Btxht6juTgfP9Mg23uo JRem2mXj2wPLYfL2b7ApnZgwh+B6j2Tea70MzAun1uhXOGg5ppONXKFLDiSkNL3oou lRCrJepAp3GqNTPoMp4/lQ4UQ2o+J3oSYR/AsKxwt8tbUiN3Tyi7syrbXuUZoFnqPj ZZWmfnZlUxLxdnyru4wKSvCIXW61Hsfpp49qOkmiDAa0qPP7DHfnUafajoVmUO+JWX ElQvRnaE+kDJ/7h/qTr0cduy0+aXUi9F6Tek0MW6Xp0sqUew3WTU/x65lsDlxHMTAt 447eNRRIG4WTQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B102B18004E for ; Sun, 16 Mar 2025 16:36:08 +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=-2.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 ; Sun, 16 Mar 2025 16:36:05 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-54991d85f99so4854019e87.1 for ; Sun, 16 Mar 2025 09:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742143116; x=1742747916; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JkdmcxBaaS3p6PvSiWcXlLke2cTf6r5uuv+EAhxULek=; b=QPNcF9/Ie0Z6cgPojtk0/2tdSXTICM400rNXCTC4fxYYE3qqZccCdq8YZ3iVrzR1cK IbMAT7Y43GgrSrQPjl/id9JonBJASnheTsHXZbe7XshT0dkj/EJiVUoUvakvpSuF5Aas gXBcap4oS7AsokHVg+ZRqk5FD9Uf7t0b2fbpMO13f2SKS+XUuqjC3QaPdB87Bc+/yeyF gUhmzR2+O3ALUWiyCpEtd2hMLomuNrC7TwCeIurub/13f+WeajvPN77+b7koODfKibM9 5zOTCzarMx01Ftr9CLpbBlqP122FMIbzBYqCdeGYtiXqHD9WysxOzH6D99rAF2O+ES9V PVZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742143116; x=1742747916; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JkdmcxBaaS3p6PvSiWcXlLke2cTf6r5uuv+EAhxULek=; b=Cs7Sg4cbk/FpkTGFiTmfIyRtNHct3xl7RoutIuCaWIwmKiax5wTH/G6LOvmSv1AhBr qOJFtkq54xmDdNgXX4JLieonUXZds+Fpb9WfAy/IvW3DgBnImzvlQBYGJNtVmDtc3Xpn i8/G9+ZfM7xSL9FvLW9yy/KNlGubnjB7ZjylBUeV8k5Ni+T74sRYYLw/p78oA4dG+M62 BGj64rbTioqAidGSKZ2iUJo5nFhQEVwBbQlpBOeKC5PZEMVKkUOcMbaioHgPStY/3WaM XBLmOtxBa4FFLwQkWi1l4MbNuQ9PS+5E3eQ466VjRkZ5gkkHNF077yDTS2J436jELO3x jiCA== X-Forwarded-Encrypted: i=1; AJvYcCWZTWeq5PKKTnaW7mAOcBfj5Upxz8iZsYUIQf75jrmTnmVufBBRoI/UY1EbTDjfmUL02sQ+F75F90s=@lists.php.net X-Gm-Message-State: AOJu0Yw2t3Qk0RQhT6Qs3AT9RTwjq0yH5CHr9O4WFZ/k3wbyFaGx/bGj 7SdE1MKUxGTJpbdAmY2No3Ui4VG0AxAOFQLzMXrPeV+1QSmQnUzGW3e7b8ygw+MOYzuijHTkv8Q m7Wu5O8iMqQ7L05bM18CrNxbWoKFCZ7F1DPU= X-Gm-Gg: ASbGnctjCVNPRx3Lwg0JB0dniEgEJHEP9dVJW6UIH4+Vl6mwpX6SrCrtP69UfkukA2h gZAQ/dCWvTYhqUW5WDcIaLeg0NOPhOwoIiXVC8ihtO6vCL/vbG6pcxWiidJrZRLjleK2vhltbw3 ZpDO0PpOzPoOmCBUpHMxEpsYINuA== X-Google-Smtp-Source: AGHT+IGd+2O1i32Pq/1pPJTNINDi4YV7cKm6U/d8QitorwPhHSBhkyUymPvilNO/VeU4qQcjAyRivJ154pxW+VJUzpY= X-Received: by 2002:a05:6512:1109:b0:549:90ac:cca2 with SMTP id 2adb3069b0e04-549c3ef8526mr4328143e87.1.1742143115771; Sun, 16 Mar 2025 09:38:35 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 16 Mar 2025 17:38:21 +0100 X-Gm-Features: AQ5f1JpiQ6qZMlO2MHrJkXMRhQEO_ofusGmrY3fqA9eJm2L9fcn4mQ8Faf4t_MY Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC - Stage 2 To: Edmond Dantes Cc: Bilge , php internals Content-Type: multipart/alternative; boundary="000000000000904d650630784d96" From: oladoyinbov@gmail.com (Oladoyinbo Vincent) --000000000000904d650630784d96 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Personally, i love the formal RFC for it's low level accessibility and this new RFC isn't that bad. The `spawn` keyword maybe the right keyword to use but it seems more weird, can we find another keyword to use other than that? Most languages i've seen make use of only the `async/await` keyword. Finally, is there any chance we might revise the formal RFC implementation?= . Nice work though :) On Sun, 16 Mar 2025, 4:36=E2=80=AFpm Edmond Dantes, w= rote: > Hello. > > > > > Just one quick question for now; why is `suspend()` a function and not > a statement? > > > > Yes, suspend() is a function from the Async namespace. > I couldn't find any strong reasons to define it as an operator: > ```php > suspend(); > // vs > suspend; > ``` > > For example, the spawn operator makes the code more expressive and > eliminates the need for closing parentheses. await here looks more like a > prefix for spawn. > > --- > Ed. > --000000000000904d650630784d96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Personally, i love the formal RFC for it's low level = accessibility and this new RFC isn't that bad.

The `spawn` keyword maybe the right keyword to use but= it seems more weird, can we find another keyword to use other than that? M= ost languages i've seen make use of only the `async/await` keyword.

Finally, is there any chanc= e we might revise the formal RFC implementation?.
Nice work though :)

On Sun, 16 Mar 2025, 4:3= 6=E2=80=AFpm Edmond Dantes, <edmo= nd.ht@gmail.com> wrote:
Hello.=C2=A0

>
>=C2=A0Just one quick question for= now; why is `suspend()` a function and not a=C2=A0statement?
>

Yes, suspend() is a function from the Async namespace. I couldn't find any strong reasons to define it as an operator:=C2=A0= =C2=A0
```php
suspend();
// vs
suspend;
```

For examp= le, the spawn operator makes the code more expressive and elim= inates the need for closing parentheses. await here looks more= like a prefix for spawn.

---
Ed.
--000000000000904d650630784d96--