Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106775 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97523 invoked from network); 28 Aug 2019 23:40:13 -0000 Received: from unknown (HELO mail-qk1-f182.google.com) (209.85.222.182) by pb1.pair.com with SMTP; 28 Aug 2019 23:40:13 -0000 Received: by mail-qk1-f182.google.com with SMTP id u190so1095132qkh.5 for ; Wed, 28 Aug 2019 14:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JLxqKml2enjNBekVb3ZVqGUJutkI851Aznt5d/6SW6M=; b=vJmlUKM9z1XREhRPcqapAdCJ6WJRFw64QOyCafNB03NqCCElO7bL4ww5OsWADzJqaY KR9TU/v/Frp+2CxtCZwu6fTPZ1PaaQdWDy7l8R6MjJMiWa5orUt74X/TkLgl3jOES84a 0Acv2pA0PdZSfohR6GOl5J7IGd5UmnNDkaseIqsCo4laXAxfk8/sIY9zYmGKjfeM7xyj lBTyOvjct1apXuqFNOaQG4LlkrEZvE5CHE591qQ0b0JLJoRsUoJa42woqaEzbB8p6WAs kM5o9Swrpc+VNbQmFTOMiqogUOG0lUdhMmywtFxXquCT7enijRvWT5eOsf9NYpDpCHLc T/Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JLxqKml2enjNBekVb3ZVqGUJutkI851Aznt5d/6SW6M=; b=dme8Dg8RaDod06hFCq0oZDjjR084kHgNZ/+LrEADv2flplrGg+nJZHS+TJELjRrRnY 5cDjRRSJoza/RPh1lDHn7MbhEFM2j0MI20yQEz1nm7Sk/XP4GcKg0L7dgn2a/MbLZfpj V2D1aP+TUf2AvflY8Hxyqnb0hRkZZ6ser1mjHYOnKfn7XtyDTKxkCEAAaReHdHY1WhVD RWF9eREVlOrnZVc5C/ZHrEmDi9Rs1Up90rVFay40UK7u05B9bG0jR5kwrX/YTJvxjk+A yAmXd7wKffRY5Ko8sR+zB8ifXOzRJ/dx0qsi84Pc7JnlN9ohOn/h02X1h2iz30CpPImO oy3A== X-Gm-Message-State: APjAAAXgj1CLtLiIlvAnIcPZElNJvFRMItPFve2OFO8WTjhXv9cXuW4X h11hgWHUST40bWWOqX0uAff6mvAQ X-Google-Smtp-Source: APXvYqwuHxV9z4QTfFWL+zTAGmVjyL+fKbIYFkgYTtRpFhwMZsKhrEwXrZu+oJj/zZRqrA+oWm6U1w== X-Received: by 2002:a37:8c7:: with SMTP id 190mr3919179qki.130.1567026747141; Wed, 28 Aug 2019 14:12:27 -0700 (PDT) Received: from [192.168.177.42] ([8.40.92.161]) by smtp.gmail.com with ESMTPSA id w196sm71239qka.103.2019.08.28.14.12.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Aug 2019 14:12:26 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (16G77) In-Reply-To: <6ed74ae0-5feb-39de-a39a-f9a8f80401b2@gmail.com> Date: Wed, 28 Aug 2019 17:12:25 -0400 Cc: Zeev Suraski , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <342BB5DE-80D0-405E-8C71-D959F38D17E8@gmail.com> References: <6ed74ae0-5feb-39de-a39a-f9a8f80401b2@gmail.com> To: Stanislav Malyshev Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: matthewmatthew@gmail.com (Matthew Brown) If we want PHP to be as easy as possible then $nullref->bar(), $foo->someUnd= efined(), new UndefinedClass etc shouldn=E2=80=99t be exceptions either - th= ey can just be notices.=20 > On Aug 28, 2019, at 4:01 PM, Stanislav Malyshev wrot= e: >=20 > Hi! >=20 >> Javascript has treated undefined variables as a catchable exceptions sinc= e >> (I think?) forever. >=20 > Which seems to be why I open a random Javascript file in our codebase > and see this: >=20 > var wikibase =3D wikibase || {}; > wikibase.queryService =3D wikibase.queryService || {}; > wikibase.queryService.ui =3D wikibase.queryService.ui || {}; > wikibase.queryService.ui.toolbar =3D wikibase.queryService.toolbar || {}; >=20 > wikibase.queryService.ui.toolbar.Actionbar =3D ... >=20 > (not my code but I've seen it a lot) > IMHO, this is language getting in a way and people writing boilerplate > to avoid "service" that is not actually needed. >=20 >> much work. This means its developers often don't improve much either, whi= ch >=20 > I don't think PHP should be a language that "builds character" by > forcing people to do more work than it's necessary for them, in order > for them to "improve". I think it should be as easy as possible, and if > somebody wants to learn how the bits move, one can always pick up a good > book or go to a Coursera course, etc. >=20 > --=20 > Stas Malyshev > smalyshev@gmail.com