Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127473 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 lists.php.net (Postfix) with ESMTPS id 9A56A1A00BC for ; Tue, 27 May 2025 07:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1748329556; bh=8FcnTyTJV1GoGbppFZBcjbSfFyVBWnL/Mv1DSvbK9S4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HEAwKLX7KNJwyU5K8//i4p6IIMiFCOmEhffz8742qL/A0ewucy2dvI432UoWv2sc0 +ZvaCK6uZBEy+6G6+aUW3pQ0POWIEkDv5UAIojhi2g8LAJptIxvWTS3Uy/9ZCLHQm1 k79AhX7f4wdums/loKTgWKPnonCZGegLGiSTOte8YPpipVmNBR1inwaM1gf9/TSrSK 0I6SGeuDMslE4mtfe/owh6itdjp3U+u0LbiVcJo3OIGqx9F0xju/dafnc99CPTkyK0 l6suKweERB3KM0MMMil7C8qF7hc9ieDDRTkRipK6IfSikuuBYEP4PY2rrTNpUzjvbu 4mMYL9kB6tDRw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 31F88180041 for ; Tue, 27 May 2025 07:05:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_REMOTE_IMAGE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 ; Tue, 27 May 2025 07:05:54 +0000 (UTC) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-231e98e46c0so23970365ad.3 for ; Tue, 27 May 2025 00:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748329680; x=1748934480; 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=8FcnTyTJV1GoGbppFZBcjbSfFyVBWnL/Mv1DSvbK9S4=; b=jyDiZREj1e0WBf9+TR4gYw7ofSAPXTMgNye5bEcW5mPkUv7IbQd3ak65yGALfNSxUP /Qskn7cD9E0uI/BlPW9gHY5qDNKUC05PtUK6o9+FIXuMt60h4ntzvltfg2lRHa83cV7y Rqxr7L3YUH0hdFvicRFAKeG4LxiFXRcXw9fqfG5t1qFtlLT1iSwRodPuKgGPkY4WRtHt dWd5lXmjJbNBuoSIN5O5cyX83PCjSfoLbTOTVr8gzSkzWHtfU32+EA8OfrCnrYfqHmb6 4QspYZZfqwhbTFQ1xY7XDECbzqPW5On7OuVF41D5jd09m6TM1zOQvf0/JXTymHozcrzz dAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748329680; x=1748934480; 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=8FcnTyTJV1GoGbppFZBcjbSfFyVBWnL/Mv1DSvbK9S4=; b=v06I7NGf13+s/tKd/kOdGyCANOaP7EUN6EZl+4qXK4YTWPpRqxAnFjF7uL9OUB19FV 8VrYlp7Xzs6Cd23QmASbawWTvlfKIrDsLJKrFns4hsa/ZeA2zoMYquwhcpIkDyQFYvGH 1h/As3mlcRAzgUcViwpyoDJVAE4nBM5K6EUKOrnVCdO/K9a9inpeuTRLyIJ2flf/ECXq HLxO1deCHeBt4Is6Nm6KNY+YExDmv+sMPnEsHszUUgXRnR2Yrz1uEgArKRGxv+oa3KL3 GZ1qW1ZcbPm+fi6VzFeebEFN3+SU9rCyLielA7/SsmqUq+rP0D0VhV0HDUuTLRI4WLHn rvgQ== X-Gm-Message-State: AOJu0YxxFYVCiJ79kn6nrgTRdJU5aA74jUJylFS8Nll7SEVi82/RBHX9 +OjtjaEUDD1ftfvW9vSQT5QBtWkqfeEB6sH9hIpPGXpUXUrg/UC5T6Gwgcf1BgSSKccy+L8KkHe g+qtC5VuOKIeWw5Dbfh4JFlpSCd156Hs= X-Gm-Gg: ASbGncudTBWk714ZnaTHcUxNmotlc36HhBH4eAUimd6jbFQXbCYS3+ej0hAtbOSUL3X VJr9l+OO/tfKf4osM3oLAEC37xSZVCuaCOg0/P9lpOm+VVERB4zEN+SibVd9XnlFKvQxRPLNaiL lGgnBr/hbjQefH4fXar3yj3g4DkINBP1MEQw== X-Google-Smtp-Source: AGHT+IHMSWBql7ojm1Hag/9+ICO96St3Lfuu4Z0kuKds+AD5IHIJwnKzRnl/kVnWEvYaSmH8VgG7TREdTEtmFDrGygE= X-Received: by 2002:a17:903:1a4e:b0:22e:60b9:ac99 with SMTP id d9443c01a7336-23414fb190amr226934775ad.34.1748329680455; Tue, 27 May 2025 00:08:00 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <5f4e28c3-e61d-4974-95df-923bfb6fbdf5@edison> In-Reply-To: <5f4e28c3-e61d-4974-95df-923bfb6fbdf5@edison> Date: Tue, 27 May 2025 10:07:49 +0300 X-Gm-Features: AX0GCFuzYu_9zZSC92EnWWXgpVe81iAZGxgOnO4UUGS-yNBYJWK2_ep52lT9CKA Message-ID: Subject: Re: [PHP-DEV] RFC: Single-Expression functions To: "tovilo.ilija" Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008dce18063618b99c" From: xepozzd@gmail.com (Dmitry Derepko) --0000000000008dce18063618b99c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On May 26, 2025, at 11:05=E2=80=AFPM, tovilo.ilija = wrote: In the "Single-Expression functions in other languages" section, at least the Rust and Swift examples are wrong, as such a syntax does not exist for either of them. In case you got this info from an LLM, you should always fact-check whatever an AI tells you. Sure I did. Seems like I was confused by specifying a variable type along with the assigned value: Documentation docs.swift.org [image: favicon.ico] var mathFunction: (Int, Int) -> Int =3D addTwoInts I=E2=80=99ve double checked examples and removed Swift and Rust. Thanks for= that. ---------- Best regards, Dmitrii Derepko. @xepozz --0000000000008dce18063618b99c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<= div style=3D"line-break:after-white-space">

On May 26, 2025, at 11:05=E2=80=AFP= M, tovilo.ilija <tovilo.ilija@gmail.com> wrote:

In the "Single-Expression functions in other=
 languages" section, at least the Rust and Swift examples are wrong, a=
s such a syntax does not exist for either of them. In case you got this inf=
o from an LLM, you should always fact-check whatever an AI tells you.
=

Sure I did. Seems like I was confu= sed by specifying a variable type along with the assigned value:

var mathFunction: (Int, Int) -> Int =3D addTwoInts

I=E2=80= =99ve double checked examples and removed Swift and Rust. Thanks for that.<= /div>


----------

Best r= egards,
Dmitrii Derepko.
@xepozz
--0000000000008dce18063618b99c--