Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123893 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 9337F1A009C for ; Wed, 26 Jun 2024 21:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719435951; bh=QSmaOwD6gfcXuM45T40jI2hIzVKoax4kUsYh3suQYT0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=jFLncNpb1bcwUf/EfXrgpbGtbt/bOTm2+zqbOR07vuYX5w/DYXYxNOeANyWbCfsMm Pu+xNje7bn92Mr/iGBPFywnVcYidPwKKzPxt5BMKR9NBXLPgDi2SxA8FYzKEQ3RR9V w7lfVQdEPEaaxxPc9HTEOqf8zNUz58QRfybwK5WXZHxM1mKr+xzo/SbEOUmgSA6S+v td5kK1oAvh7VuCQ6Z4RpoGOwakpGePa6+75o90ss2xo9G4/DtJM6gosMItwE17PJAk 9fjUYz25Qi0xwZvqAximkoc19rne7q6rogYTf8mwzoKFTNN4c+sGxrANXO21QK6Gz7 oUelpPUv7LEbg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 09A25180550 for ; Wed, 26 Jun 2024 21:05:50 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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, 26 Jun 2024 21:05:49 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-356c4e926a3so6411849f8f.1 for ; Wed, 26 Jun 2024 14:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1719435870; x=1720040670; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=xTlqd3K2ge6SM06NzEf6K1XWJUYyDEZboZzgiUD2rXY=; b=ccXfmZ7/J4QxB3x9cfeLQtGCk98uEeDWJvJKa18YC0apkw7iH1zLSKnh1CH8R9vM94 1ysu95RhOQw0dgVBQtfKZWDQgEiBXrr4QhxnyjwKlvOU3XR7rhL1MVQHO1TLUcN6m4zt gV4IWdVoYwYXlxuDec/nOuIUbtvROz5RoLcLblWK/YDAvWRjENrtFko4O+3s/mVvT/n2 aLhN+6nu8eiO82Xc2ajKQ7IeyepWhvgewceIqtANzjyR6APxCNcvHbY4HOeLGToOeguU Z5f0LOMoOUecEjtXv4gVS1xGA/aF+YX99qO00ymuygj9bJT9lle5/go33+nUNV6YaVoJ ByaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719435870; x=1720040670; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=xTlqd3K2ge6SM06NzEf6K1XWJUYyDEZboZzgiUD2rXY=; b=PspKEoC0ghW7jEIq7LQVqUigYztTRaGP9DixxUZuVLPKjDm41KHiLR294y9Jx2iq/9 sXLuQ+aO3lL4qAzXVHQ8goLutd7VGuyd/jrKF1aWaW7ZR6xof0k/9epqlaqQxg5CITAh wv393irXZMsvq/hX9DURyksyUfsHRVWg9iMu1PwjhSQM75flLuGHXiIKabXLHfkKUQus IPZjoWRBL1tNaA7D+oX1pmTR40gKsRTE8zzmVw418wx7qLoBnIpV5uD1IOkGlkO48+Tu 3TpqyRla2kuw9sVZPns9tTTMGhWeS3uuabpM7bk6cPiEPEyFKQNlIWr/CaYEF2c/0dtO XKhQ== X-Gm-Message-State: AOJu0YzWB7d+yPD0BoHhKAYnPgRBKzMuiooiuu7DElv6PMakArn1WzHm 5aMgmrKOF+MnGdcXbL/a45DLCq8MqUuQqo65iAgKt2OidXYys9iG9k3Ewa2kRijFEfK75uxi7oQ Juss= X-Google-Smtp-Source: AGHT+IFo8YaSRrcKCpxlZj+PfPd3L5u58g9oRUuC7AhBZOoeQkf8HnE17vXl0NlqN0u0c20snl8hxQ== X-Received: by 2002:a5d:6d8f:0:b0:366:eb42:8745 with SMTP id ffacd0b85a97d-366eb428828mr8389146f8f.30.1719435870437; Wed, 26 Jun 2024 14:04:30 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:f56c:55b2:2cd4:224c? ([2a01:4b00:bf09:5101:f56c:55b2:2cd4:224c]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-367320f610dsm1663120f8f.41.2024.06.26.14.04.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jun 2024 14:04:30 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------JUg4pmjZMStrLshfeNKLw4GO" Message-ID: Date: Wed, 26 Jun 2024 22:04:30 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [Initial Feedback] Typed Arrays To: internals@lists.php.net References: <6D0733B2-A1D1-45EC-B93E-029B1616A22F@miles.systems> <71dc8137-ded0-41dc-bc9b-32dde12f9170@app.fastmail.com> Content-Language: en-GB In-Reply-To: <71dc8137-ded0-41dc-bc9b-32dde12f9170@app.fastmail.com> From: bilge@scriptfusion.com (Bilge) This is a multi-part message in MIME format. --------------JUg4pmjZMStrLshfeNKLw4GO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 26/06/2024 21:56, Casper Langemeijer wrote: >>  Generics or bust. > > I do not understand the reasoning behind that. Is it because we really > want generics, but when the 95% use-case is solved we fear that there > would not be enough momentum to get that? I'd love to have generics > too, but a very simple array syntax would in my opinion still add a > lot of value, even if we already had generics. It's not that there wouldn't be enough momentum; if anything, a successful typed arrays PR could give rise to such momentum. If it were possible to have typed arrays that were fully compatible with an (imagined) generics specification then I would be all for it. The problem is, how can we ever ensure compatibility with something that doesn't exist? It seems to me we either solve is problem properly (with generics) or not at all. Cheers, Bilge --------------JUg4pmjZMStrLshfeNKLw4GO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 26/06/2024 21:56, Casper Langemeijer wrote:
 Generics or bust.

I do not understand the reasoning behind that. Is it because we really want generics, but when the 95% use-case is solved we fear that there would not be enough momentum to get that? I'd love to have generics too, but a very simple array syntax would in my opinion still add a lot of value, even if we already had generics.

It's not that there wouldn't be enough momentum; if anything, a successful typed arrays PR could give rise to such momentum. If it were possible to have typed arrays that were fully compatible with an (imagined) generics specification then I would be all for it. The problem is, how can we ever ensure compatibility with something that doesn't exist?

It seems to me we either solve is problem properly (with generics) or not at all.

Cheers,
Bilge

--------------JUg4pmjZMStrLshfeNKLw4GO--