Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116182 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81032 invoked from network); 27 Sep 2021 15:43:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Sep 2021 15:43:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 423A5180539 for ; Mon, 27 Sep 2021 09:26:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 27 Sep 2021 09:26:10 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id y13so25241970ybi.6 for ; Mon, 27 Sep 2021 09:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=pYZXDrw3ZcW5iLUrXCckDO0NbdHU5J4pNQAgpB1NWHE=; b=BuCROXN4q6xbDLl07CVY6J6qN0xaPssdwQNQO36P1cYJ8YbzmoFiATn3GMdNa0pxnL lcvXVbl4qtcQf6ytD3CR2Wy2ob/GfuAT/0jJLirzsNKAqPo4yOWj2/7htcMEhCM02Aqk D2o6zCF94pPkUJSu0cm4tOpwJb0ZODsVFUj08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=pYZXDrw3ZcW5iLUrXCckDO0NbdHU5J4pNQAgpB1NWHE=; b=CBJMrnNzY7P4tfy62JaDGcZ0OUAsR1S2CS4s3nzweW+e+nG85j9lMqLQ819JE6yaEa bp+soNKKrueGAniAjS2xa6pNfagWBmoiWS+Mc++45XzIvP6NSWnA3kSbI7iF6KhBbYk9 ZO28Apnsy7w7CjeI82W62tLLhe1LapliwRnCSTojLVXDoRPkIpdQzrVsXTmfWi8wA2VF vBVflazGH8K8XgdDRq0S97brdQViXQmNwr0MBgPPOSFEPgOOfcj4x1GMOIb+PIsACBx3 HQIuuFOdj8s5YNmTU8Nv/weyp0gz7hp9RTujSMIo614EQB4RMChPvkbOhuDwF3yE2Zzp XhrQ== X-Gm-Message-State: AOAM533X/p4d9tUY69PwzmDYsvYZewvner/17DJx8aQOEthnMABZfItz TPNxUkibTTJe51CSVdSSbJf4wy++0nu98IqJijrlmiqhTjw= X-Google-Smtp-Source: ABdhPJx5nsyP+UxrHqe9qXiZbKL5zuvuMxfCnYjr2SDs1S/TkNFiOvfXB9CfpufjXhf2yMT6pdQbz6xf8Kqaj4r/Lmo= X-Received: by 2002:a25:2592:: with SMTP id l140mr797318ybl.205.1632759969188; Mon, 27 Sep 2021 09:26:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Levi Morrison Date: Mon, 27 Sep 2021 10:25:58 -0600 Message-ID: Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Static (factory) methods in attributes and initializers From: internals@lists.php.net ("Levi Morrison via internals") I'm not exactly sure what you are proposing. However, it's always worth noting other languages which have something in the feature space, and Dart has both named constructors and factory constructors. You should start with researching what they do, and what other languages may have the same as _language features_, and not as patterns e.g. Java has a factory pattern, but it's not part of the language (at least not that I last checked, I don't follow Java).