Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124167 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 691771A009C for ; Mon, 1 Jul 2024 22:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719873324; bh=72/PEXMgFmf+JPVAduYvgDAtMy3q4jzSORRz9usGzjQ=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=gZpt/EpnbW7hNNCKeJ4ytQ0Kb71+lEDfPH2wmVMK9rM+n6zW499URsRcNorPQt2Ar Cvkx9Ki6Ojks+UIZTxGA5n3wvIqejQwddHLFyAkSkC1hxwzKCa/rbDBclpAetJ4Z0N w25+Fyw0xqo9Quf9EWC1zRVfiIh/eYVFPCM4A23DO1l6wh3xBARrcjtq6GoEgqJKMP OXkAPFJT5vEcpEnxTi7uSlQUbOk1oK+zqtYL2iQ2zKxokjn1DcnzHW8vLzb+NbJipo oLbqdJM+wKJrJqF8K6JGHqe9RvtbFkgNAG7jkQnKLJ2OIbYPdoBlNGTyi0h+YNs/// OnZ/MUhHLAtiw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 52F61180076 for ; Mon, 1 Jul 2024 22:35:24 +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_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-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (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, 1 Jul 2024 22:35:23 +0000 (UTC) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-64f4c11d2c9so9321187b3.2 for ; Mon, 01 Jul 2024 15:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1719873242; x=1720478042; darn=lists.php.net; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=kk5Jo8Oey6L/1U6tcCxyrT3SgN1sdE1np9WKvSqOpdM=; b=ttHdTPNWI2uxmYpaWLpErMP/C2pn8mbuZfplydr7Sows7t0qrTZZbk4UeZeWq6DW+C tHgKucTvYF8yUUublWRaKTQo4qfYsd/Baho0RMfY+91d5uAYMK8loH1JwAy7amjC57n/ 3lVjxCFNtVQMlEv5g+2/UBMPligyTJWcixBQN3lw+O8RLfMpGe2aMrGXdubLOKA8ifMT AHkvqZfYCwYOjwUj9mw6G1AlwKKKBO+QFKmpM9P/0oSz+NQ6pDWE87ydXI04ziKlfKIb 5igrUwBtoPdzm+bExUG4+vhuokA3J0WCxM10iIbt01vQfxMwc5/bp6VMJt56pWFhtis5 PKnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719873242; x=1720478042; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kk5Jo8Oey6L/1U6tcCxyrT3SgN1sdE1np9WKvSqOpdM=; b=jX+DGAhTx9HGuVN5JOhSEeWd/poICr4ASnYJ878zS0ON6x4Jwg1kCxXI69aYQogQFT iUYZ02UUQY8abhQVDPusKAljkAbgWyJaSEy9JwCp1biZX9aUkWvfaoG3OOkHP8cWFhpA KCldYNta3sB3wIiUgW/OqRQNSH4kOBrwOS214OT+KSoDIh4FDcREhFvvCR9/q7QcftPv uBY7Ag6FHrwy8DzTlo7UzmVUDjCLSLb33QhQC6nvN8NiGUOKFH8TAR4VFPjJydlCQO3P HTcFQkN9ANQ9SXxqSpLmWlMefPKQvCEK2avFFwEGjDqGTKEnOQ/dwRLK1AJwIDB+hdOu rbhQ== X-Gm-Message-State: AOJu0YzudcCMq1JvXyBW3toDQHD5KxKGd9DVeK76xQaOCm5yApMzEiFv Oxbt7anZXzb++T+g7DPoXB1a5vECrxV+J2iro/kNW8nvhwWse0IwMmuF3TLrhkY3BfTKhb7tgky iUYk= X-Google-Smtp-Source: AGHT+IHaSy7DB5EQMP6AzgSFHdeVYqG+mFKliuOSCGBDal5BUpm5E2oICzkxEpmedzJVW4cj9Lw+8g== X-Received: by 2002:a05:690c:d82:b0:643:9a13:fae2 with SMTP id 00721157ae682-64c71ecbafdmr97018357b3.28.1719873242224; Mon, 01 Jul 2024 15:34:02 -0700 (PDT) Received: from smtpclient.apple (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 00721157ae682-64a9c406839sm15436427b3.133.2024.07.01.15.34.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2024 15:34:01 -0700 (PDT) Message-ID: <53D812F5-347D-49EE-B21A-B19DE2AB0F35@newclarity.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_49A196E5-B38C-44DF-8E1F-427FA68728D0" Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PHP-DEV] Iteration III: Packages (was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript) Date: Mon, 1 Jul 2024 18:34:01 -0400 In-Reply-To: <0d5825cf-fa3a-40fe-b548-933221267a37@app.fastmail.com> Cc: internals@lists.php.net To: Rob Landers References: <1917CF7C-26D8-4DBE-B05C-5AA650AC6C9F@rwec.co.uk> <551cd5b0-1c00-4818-a9ca-97f6b7e8c3dc@app.fastmail.com> <39B496F8-062E-4848-9B3B-529BE8D3415A@newclarity.net> <856F4F70-DC81-4098-82DD-5F6D47CDF3F0@newclarity.net> <09559430-4477-4516-8D78-6F4071E1AA6C@newclarity.net> <0d5825cf-fa3a-40fe-b548-933221267a37@app.fastmail.com> X-Mailer: Apple Mail (2.3696.120.41.1.8) From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_49A196E5-B38C-44DF-8E1F-427FA68728D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 1, 2024, at 5:07 PM, Rob Landers wrote: >=20 > On Mon, Jul 1, 2024, at 18:22, Mike Schinkel wrote: >> > On Jul 1, 2024, at 7:57 AM, Arvids Godjuks = > wrote: >> >=20 >> > TL;DR: As a userland developer, in my opinion, this is just a = downgrade from what we have now. Enhance namespaces to have the ability = to have internal/private classes, interfaces, enums and constants. = That's about it. >>=20 >> Please note my comments that follow do not mean I am in support of = this package proposal as presented.=20 >>=20 >> > Autoloading is one of the best killer features of PHP - love it or = hate it - it's your personal preference. >>=20 >> Two really solid reasons to hate autoloading as implemented in PHP: >>=20 >> 1. Autoloading runs userland code. This means it has the potential = conflict between different packages with different autoloaders, it means = there can be buggy autoloaders, and it means that when using XDEBUG = every time a new symbol is found when the developer is single-step = debugging the developer will be dropped into the autoloader and then = best case they then immediately trace out. All of these aspects a major = PITA and time waster and make debugging more exhausting than it needs to = be. >=20 > FWIW, (in Intellij at least), you can set it to skip those files. I just went and looked again, and after having requested the feature in = PhpStorm over a decade ago, it appears they finally have added it. I had = given up that they ever would, and must have missed it when they added = it. Thanks for prodding me to look for it. Of course that doesn't help if the source of the bug is in the userland = autoloader code, but is an improvement much of the time otherwise. -Mike= --Apple-Mail=_49A196E5-B38C-44DF-8E1F-427FA68728D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On = Jul 1, 2024, at 5:07 PM, Rob Landers <rob@bottled.codes> = wrote:

On Mon, Jul 1, 2024, at 18:22, Mike = Schinkel wrote:
> On Jul 1, 2024, = at 7:57 AM, Arvids Godjuks <arvids.godjuks@gmail.com> wrote:

> TL;DR: As a userland developer, in my opinion, this is = just a downgrade from what we have now. Enhance namespaces to have the = ability to have internal/private classes, interfaces, enums and = constants. That's about it.

Please note my comments that follow do = not mean I am in support of this package proposal as presented. 

>= Autoloading is one of the best killer features of PHP - love it or hate = it - it's your personal preference.

Two really solid reasons = to hate autoloading as implemented in PHP:

1. Autoloading runs = userland code. This means it has the potential conflict between = different packages with different autoloaders, it means there can be = buggy autoloaders, and it means that when using XDEBUG every time a new = symbol is found when the developer is single-step debugging the = developer will be dropped into the autoloader and then best case they = then immediately trace out. All of these aspects a major PITA and time = waster and make debugging more exhausting than it needs to be.

FWIW, = (in Intellij at least), you can set it to skip those files.

I just = went and looked again, and after having requested the feature in = PhpStorm over a decade ago, it appears they finally have added it. I had = given up that they ever would, and must have missed it when they added = it. Thanks for prodding me to look for it.

Of course that doesn't help if the source of the = bug is in the userland autoloader code, but is an improvement much of = the time otherwise.

-Mike
= --Apple-Mail=_49A196E5-B38C-44DF-8E1F-427FA68728D0--