Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123794 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 AC6611A009C for ; Mon, 24 Jun 2024 22:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719269876; bh=rhsWggFxaGyfmEh4Lop75JnG0Oi2NNu9DrlBaSbLvqk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D3VZG2zdOfBsvnIMS7cNULSb/gIcq93uCIdGxjoyXJlSdRc+2c6Gdkgx7+/XmE/c0 b2/naweSlrIf47ITOx+iqTn+up/fGm5+lRXn4BPN2Qn48EoBJBZDbWzfKH07N7tjTW uzaYZ8WEg12UKE7bxJgdV/8JBT6nR0yCQoLWv8Uqc02LMr0E36e5hkOsEexoUVJZfp AaWApXDokXJaLiZjJuJiC0GyxJpEzjNMKxLCqVRy5M8Tbzofe2CeNUWifshMtAHKS3 gHpRa4Ow1rN6U8NTvfkdhYjVbsDs5MeNCBSB7KGmMxEChZawsZMvqpQdYCXhysY8Tj 7+Q3y1BKCVtPw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0FA041805FB for ; Mon, 24 Jun 2024 22:57:55 +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,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-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 ; Mon, 24 Jun 2024 22:57:54 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52bbf73f334so3685567e87.2 for ; Mon, 24 Jun 2024 15:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1719269796; x=1719874596; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zX/gxay2NagkJcrcyzI0LS2aDM0+es+53PNVXpUK43Y=; b=IyNhoeUwutxqVYSrODPigQw26ZrV9I1NPpOeeRdaZu9WSiEHtv2qIu9PGMUkfnOMpQ fNcMPL+Nh3/0ZxCT1in7RLGJF9MfkgxbzUNre7LUtJDC3OYXJBugIoIAyHuiDYKp/iML EjZuNjQdwjiJEHaFGIfsWuCQa6FnynvxgHyxzapf0XDDClZUOkioqAcbIzDhzwzn71eF uju/vy9q0sU+OZd1TRz0qRDGJEUzS1/CbQwaaLNwX67KvWHUJgXv/9h0b6OxDPc8ERis 9E5tz5ipCqICD4V9osdQPl14BsjpBGNBf5YZyICkR3XHvbLNRdc2iCNPlHcn3eyz3kbY OVXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719269796; x=1719874596; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zX/gxay2NagkJcrcyzI0LS2aDM0+es+53PNVXpUK43Y=; b=gxtbUckvLiB0303EIOdKmXe3uzDG52eBOMJmzBiuz8sk0Bdy9War315SMFNugz/38x 6GE9T47UNvt9SKVr0J0KPQnnou6q5szeiM/4hKUueP6BtFoDMljKeObM6s7JyRZA5vTQ 6naYgLWhVF271yzKIPM9f7EkYG+Wx4zSqVJG5uFNsQPDV829jTqfL7DTnkn77g6LASzc SMWdUS65jJyhyyDsDGCWu6TDlh2GcqWME2Ij5QMcLGLe+I18E+eD6+SJ9lOFfuVsgG2c KDCoQUhf033kLwjlXclXO3urZbEaeduypv1V+EaHLWpginDJW40QhrHLQy9fqdrZahqO WUqg== X-Gm-Message-State: AOJu0Yz7eH6PQQt7u+8lJ/kyCc2q49bucmMJsQvFrZlxOSWGtH1g7L9E yZaUNmaYjL6KEvs5kOQ49iiecHTFJmbjE27jRaaNFhKPssXNRLe5iW3/3HRGnbY= X-Google-Smtp-Source: AGHT+IHHt1zoNOzBBdrkPBu0zJngrI8zTtaZX350TT7fjbWNdPSBTSmaDt2kicZN1SOpuyUob4LApQ== X-Received: by 2002:a05:6512:b1d:b0:52c:84d1:180e with SMTP id 2adb3069b0e04-52cdf826746mr5208317e87.67.1719269796049; Mon, 24 Jun 2024 15:56:36 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:7168:677:94f9:b75d? ([2a01:4b00:bf09:5101:7168:677:94f9:b75d]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4247d0c5492sm191119915e9.24.2024.06.24.15.56.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jun 2024 15:56:35 -0700 (PDT) Message-ID: <942bd631-a7c7-4705-af90-b00a9acf7231@scriptfusion.com> Date: Mon, 24 Jun 2024 23:56:34 +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] [RFC] Static class To: autaut03@gmail.com Cc: php internals References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: bilge@scriptfusion.com (Bilge) On 24/06/2024 22:56, Alex Wells wrote: > Hey Bilge, > > I'm not usually a resident of these discussions, but it seems like > this RFC is heading into a wrong direction. Let me explain: as it > currently stands, static properties and methods live separately from > instance properties and methods. That means a couple of limitations, > namely: a static class member can never implement an interface's > contract, and hence a static class could never be used as an instance; > static class members have a separate reflection API; static class > members cannot have expression initializers; there's no static > constructor; and so on. Adding `static classes` would not solve any of > the above issues, and they would still be barely useful. > > To counter these issues, Kotlin has a concept of `data objects`: > . Hi Alex, If you wish to implement data objects, what part of the current proposal precludes you from doing so? Cheers, Bilge