Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123558 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 745E11A009C for ; Sat, 8 Jun 2024 01:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717811153; bh=gssxrYa0xtT2ebCRA2LIvkASBZN6CHQbIrjdtMcZZgs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=OhppLBMBD9CB9obQadLWr1lCSb4MiEsvzi9tlNliHc3xr82Dh5I1z9AYcOpn/pyCm Nj5CN6fYXUjfd4rS5ttsJ4EPHJf71Eqn0nh5COAjIvQS59zH1KcjoB0vDGb8YHjpe+ KMERs995NlAdZa2gzUl8VS4LQMGFFFZE8WHFb3RktnIlifNAP/J5LkWHWHhQ+s0L3c KpZwUkcy6hCoXFBihco+Dz3i52CkOS7g/4kmKPT3/dI4cx3cFvyAtOJTayiEUwCoXW P7Nj46r/qgglLCri/E7ilEdGMjTcuc5hThmcpgSmKm+Bz1FMKmfJGc2CCJttbSY5++ q7Nz5ZEtj+KSg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 59BE9180050 for ; Sat, 8 Jun 2024 01:45:51 +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=1.0 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, 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-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 ; Sat, 8 Jun 2024 01:45:50 +0000 (UTC) Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6b065d12dc6so4136626d6.0 for ; Fri, 07 Jun 2024 18:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1717811084; x=1718415884; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=gssxrYa0xtT2ebCRA2LIvkASBZN6CHQbIrjdtMcZZgs=; b=UoPxSsWd1SdL09qaPoBjlVzIrA4xAMTMHAJhjFKLpi6/MChqSyQys4LY1YVniEHF4j udA2PmZd0N+09zz244LUvhnD7qWV6zm0YiGDG+83+3xM7TY/XyiUHghxxrZbo3hZ/kdm 28PqV6dA1QRPIm7Z4+pkF7G4gZhzbpxo9DACSD7cajxIZ1gY0YfYjxY/2SNJOYGkNhJr ptQCYmtFM7pXWgE0spcrTDc3q6Pn3hLTEW2JntO47bGNDYe950EHn+QPpiFZW1HeRdAp wxC2dqleZQH8GqR5PianUcejQPHcTBEzEKrzMgfpdAyYcfsChLZBGjwWI7j8N2oVaY9p WhjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717811084; x=1718415884; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gssxrYa0xtT2ebCRA2LIvkASBZN6CHQbIrjdtMcZZgs=; b=hanUmLLIHArRMZJ1owZ3kkIlAFL1fosXhFZIwwg59NwjmnWyNsZyNJLnJuixtLcfxk YWUiw9UsN1qVSeBXApHn1lxNvK1d0/ZefA5BuZEkVQ4LpluVPAaWnMYnA096lmwr02sp ARJJ7tiJxsCxyRT+ioIRagm0Tg+VKlJcjMNs6C+NWXCmiM3b6eLhwvhNyH9bwkT5I1UE M4hIZ1fKoLrX9CSHz8nfUrVwQ65ftsLYBRiPpRhD1Ud+4uCbi5+MeAxJoqtAOCPYTUay Q9xzp4dcBh457uEjp6Qkp3vZTo1fflh9J9pNgmzXT0XZdum81iGvi87aLlUVysT7cghk sB9g== X-Gm-Message-State: AOJu0YzADeAgQc7wmZsMli/JfcmzyPJe0OCXXw/ciO2Xk0tuE60b7diN Qu2ev2IoZy1NIlMjs/8MjxCnXL9ioLaMtQy004kGoT9VHTQ/B1cPl8UfljvN/eg2J1JPZrjDi32 F X-Google-Smtp-Source: AGHT+IGAJB0gHuzDvk2yz1KXIRjlI/dmQPgaYAgcxL7F15wWAyiJxaR64q6+oZzfKg028r2ZrygI6w== X-Received: by 2002:a05:6214:5c44:b0:6b0:41e6:784c with SMTP id 6a1803df08f44-6b059cf4ff8mr54023436d6.38.1717811084051; Fri, 07 Jun 2024 18:44:44 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([98.97.21.183]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b04f9fb10csm22759446d6.120.2024.06.07.18.44.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jun 2024 18:44:43 -0700 (PDT) Date: Fri, 7 Jun 2024 21:44:42 -0400 To: Erick de Azevedo Lima Cc: "=?utf-8?Q?internals=40lists.php.net?=" Message-ID: <4FF9662A-55ED-4E46-B2BC-4D43E328D994@getmailspring.com> In-Reply-To: References: Subject: Re: [PHP-DEV] RFC proposal : "new" keyword shorthand X-Mailer: Mailspring Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="6663b78a_6b8b4567_f61e" From: john@coggeshall.org (John Coggeshall) --6663b78a_6b8b4567_f61e Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jun 7 2024, at 8:49 pm, Erick de Azevedo Lima wrote: > The new keyword is meaningful and everyone knows what's being done just by looking at it. Removing it would make the language less readable. But it's a BC so big that I don't think it can be done anyway. > > FWIW Languages like Dart are very readable without the extra new keyword (it supports instance creation with new or without it). I haven't put any thought into the engine changes that would be necessary to implement a similar syntax where new becomes optional, but I wouldn't be opposed to such a change if there was a PR out there for it. But I'm with you -- I think new is fine. I 100% don't want to see it replaced with some sort of confusing shorthand, but I might be able to be convinced to make the keyword optional. I also think in terms of value, cycles would be better spent on other things than to new or not to new . J --6663b78a_6b8b4567_f61e Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Jun 7 2024, at = 8:49 pm, Erick de Azevedo Lima <ericklima.comp=40gmail.com> wrote:<= /div>
The new keyword is meaningful and everyon= e knows what's being done just by looking at it. Removing it would make t= he language less readable. But it's a BC so big that I don't think it can= be done anyway.

=46WIW = Languages like Dart are very readable without the extra new&= nbsp;keyword (it supports instance creation with new  o= r without it). I haven't put any thought into the engine changes that wou= ld be necessary to implement a similar syntax where new = ; becomes optional, but I wouldn't be opposed to such a change if there w= as a PR out there for it.

But I'm with you -- I think new  is fine. I 100% don't want to see it replaced with some= sort of confusing shorthand, but I might be able to be convinced to make= the keyword optional.

I also think in terms of value, cycl= es would be better spent on other things than to new  o= r not to new .

J
--6663b78a_6b8b4567_f61e--