Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122346 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57471 invoked from network); 8 Feb 2024 16:01:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Feb 2024 16:01:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707408123; bh=cMFL6NCa5gmoHu4eL4O1dlyHAMlMiD9O9hZuA/ZrFtc=; h=In-Reply-To:References:Date:From:To:Subject:From; b=OCSZYZmZZrFIx38hcnKALwY0Zvixl5g7O6YcAAlJHG0quJWVOS8XBX6cgyAV3FWZh Vwnm03nDlNV0T3Jrvw3+FpcJIKGDT3zaISofPlPxuWCger7q0Djg/gijfTOByYdPc6 X5i5JLQpCLAGrqpVzt5vtrDpNcJFyOCosu/sL+UAkHALP2/oQEYjGyvu+w7weAe2hJ 8OoDgBSWuSZ1C27/qonNiK62VHvCmocIE8qAQJ4I6sXAs/ghkAQ01jdjt/Ux+b42BP AnNWi6PYvxwxxRAm+hD7taKtJP03gSeOnuBdcb5FX5UGHZCGNNS/DftNoZmMEA7LfY A+MzNeqTUSeug== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 74000180071 for ; Thu, 8 Feb 2024 08:01:59 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 ; Thu, 8 Feb 2024 08:01:58 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 759905C0185 for ; Thu, 8 Feb 2024 11:01:03 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Thu, 08 Feb 2024 11:01:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1707408063; x=1707494463; bh=77qya6U/LKSWg0XsIZ5Tr LFGa62U0jusc/gtQfblVBg=; b=H54dABrqI2JVIQ+ZC28XHrfOytOlcRldPNkLm MpJIhvJ17eJX+XI0CHnXnAAkSYm9iTr20dBZEZXQcoiRfl44KXiGityFIIxGd+LH 0EB4AIeA7QQc1YEav/fEEsQ+OJAreJsA0Nj/n9WtpMGf2liYSj6XAYHReRQuqVEa XOngPA3yRMG+FNJcM2UqrRULDa7h+c1z+93dMzB/HRxxjWgvecYdXrd0rETrrbGx kYt/iIomnP4GxH8K+BPrFh2/vTn3In6Aun6jcM0WeegmP1NkLOzDWbJ20j+KwlI9 ZaGloCU4VNkHVLieR8qe7eZqy/WqoA8XxLdsxBPrDJFcjRz4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707408063; x= 1707494463; bh=77qya6U/LKSWg0XsIZ5TrLFGa62U0jusc/gtQfblVBg=; b=N H9QaUxTriR0B65++O8tuX0f96GdDBbocNxdE5OgPADpLL8HZbnzyjPPQ4qIGA+gV n4TxFJL3oohPdCBr/bElnIA6/XljpwyCRr5OMxNuX7QadRZI+jBzGpEo+ETtq803 hO6F2k7JF+TIhWYPgO84pVvN6Z9vl5p4z2tafuwFGcStCL3I4ry/QD9PnudqWmbD +ZPJhX8G26ukaV5GcaZP8NOJGGns7WNqvRcJlZOQqT6Bx2l/dAD8sWLIq6w82JZb pNVLNSwLOxbdT72697rD8qBFv+VzJRYXXv/l7Nr4UHbfhOgyzNBx7eiJRPNJHHQL YtfjrWwlMwREexadE+vZg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtdeggdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpefhkedtfffghfekieduhedvheefgfefheeugfdvleet teektefgteejieeltdelkeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgr rhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 06B211700096; Thu, 8 Feb 2024 11:01:03 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 MIME-Version: 1.0 Message-ID: <90cc47f7-ba80-4798-8447-2f3bb5734eab@app.fastmail.com> In-Reply-To: References: <742f202d-7990-4f51-b903-7a15e3fd33c2@app.fastmail.com> <1cd8fa7b-ab62-4563-bf13-bb7801f1ce8d@app.fastmail.com> Date: Thu, 08 Feb 2024 16:00:42 +0000 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301 From: larry@garfieldtech.com ("Larry Garfield") On Thu, Feb 8, 2024, at 11:15 AM, =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0= =B8=D0=B9 Senior PHP / =D0=A0=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1= =87=D0=B8=D0=BA Web wrote: > Just because PHPStan is a ready solution for design errors that you can > predict. > My case is about errors that you detect later, after the design is > finished, PHPStan shows you that "all done!". > > Because it's not \LogicExceptions (types, mappings), it's all > \RuntimeExceptions... You have to implement it after the design is don= e! > Also writing code comments for PHPStan accidentally increases time of > catching \LogicExceptions that will be autocatched once an exception > happens and is reported. This is necessary work, but it increases the > estimate; the business does not want to hear long deadlines, and consi= ders > you ineffective. But if you say too small, the code will not even pass > PHPStan, it will not even pass visual inspection. Therefore, I say some > magical things, and then I correct them, for some reason they like this > approach better, they are not used to improving until everything works > properly, they even push the word into the lexicon - MVP. This means =E2= =80=9Cit > doesn=E2=80=99t work well but it works=E2=80=9D, it seems normal to th= em in order to get > results faster. Because they will receive bonuses for results, but for= bad > results you will receive punishment. > > A closer solution is "get out from the job where business was built th= at > way to ignore complainings". I had worked for 12 years. I've changed a= lot > of jobs because of that. And any new job is the same. It could be more= or > less ready to build the same, but they are working on it. It's not a > solution either. As a result - "you cant rebuild > non-yours successful business that gives you money because you know how > things work", you have to fix or lose your rent home. > > =3D=3D=3D > > @Arvids Godjuks > > I had to work in such companies, and there were 13 projects at the mom= ent. > But after some time I realized that nothing depends on the number of > projects. All businesses strive to not give away the right to think to > their employees. If this happened, it was more an accident than a goal= . If > they are forced to listen to you, you are considered a problem that th= ey do > not yet know how to solve. > > Now my company has only one project, which they are leading themselves= . But > business and profit dictate the conditions - at first we do a year very > quickly, then we redo it for 3 months, which we will have time, but the > amount of legacy is too large, because the pace is insane, and the tas= ks > are becoming more and more difficult. > > They can't just "wait quietly until you finish." They will ask you whe= n, > and will be disappointed if you suddenly suddenly realized that you ne= ed to > move the deadlines, because there are already 5 new ones behind the cu= rrent > task and they are planned for the quarter. =E2=80=9CRewrite better=E2=80= =9D is not included > in them. > > Let's stop discussing my personality, I gave a rationale for why langu= ages > should preferably help developers, since such a question arose. Because > there won=E2=80=99t be fewer situations like mine, but there will be m= ore jobs. And > there will be a lot more bad companies, and in the end there will be v= ery > bad ones left. OK, there's multiple, really unrelated things going on here. Let's cut = to the chase: It sounds like the root problem is not code, but management. The OP's m= anagement is insisting "make change X to a bad codebase, but we'll give = you 1/10 as much time as doing it properly actually needs." That is a s= ocial problem, not a technical problem. No software will solve a social= problem. In this case, the social problem is "your manager is an abusi= ve moron." Sorry, PHP cannot help you with that, no matter what feature= we add. Moreover, adding features to the language to make it easier to write slo= ppy code that will be harder for the next person to maintain is a losing= proposition. It will just compound on itself until both the language a= nd applications written in it are universally trash. PHP has spent 20 y= ears digging out of "quick and easy" design decisions that were made bac= k in the 90s that are still causing problems today. I do not see any ap= petite for adding more such structurally-poor features. There may be an appetite for adding features that make it easier to writ= e good code that is self-correcting. We can (and do) debate what featur= es qualify for that description, and whether my checked exceptions propo= sal qualifies for that, but that's independent of "my boss is asking the= impossible." It's not the language's job to solve for bad bosses. I think what you're looking for (since your descriptions are not particu= larly precise) is a customizable version of json_last_error() and friend= s, which operates on global state. I am only one vote, of course, but b= ased on prior discussions here I don't believe there will be any support= whatsoever for a global-state-based error mechanism in PHP, ever. If a= nything the trend is to move away from that, in part because it makes "h= ack random shit into random crappy code with more globals" harder. That= 's a good thing. If that's the case, we should probably just close this thread and potent= ially move the checked exceptions discussion to a new thread, if anyone = else is interested in continuing it. But the original request here is, = if I am understanding it, dead on arrival. No amount of talk about bad = bosses with poor expectations will change that. --Larry Garfield