Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106063 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2533 invoked from network); 26 Jun 2019 09:34:09 -0000 Received: from unknown (HELO mail.gna.ch) (62.12.172.119) by pb1.pair.com with SMTP; 26 Jun 2019 09:34:09 -0000 Received: from [10.0.1.55] (77-56-180-37.dclient.hispeed.ch [77.56.180.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 79C3120FC5; Wed, 26 Jun 2019 08:50:29 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) X-Priority: 3 In-Reply-To: Date: Wed, 26 Jun 2019 08:50:29 +0200 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <6D1026FF-ECF1-4604-91A8-D290D37CC238@cschneid.com> References: To: Arnold Daniels X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Strict operators directive From: cschneid@cschneid.com (Christian Schneider) Am 25.06.2019 um 15:09 schrieb Arnold Daniels = : > This RFC proposes a new directive 'strict_operators'. When enabled, = operators may cast operands to the expected type, but must comply to; >=20 > * Typecasting is not based on the type of the other operand >=20 > * Typecasting is not based on the value of any of the operands > * Operators will throw a TypeError for unsupported types While I understand that some people don't like the way PHP does type = conversions I think this proposal creates a much bigger element of = surprise when copying PHP code from one place to another than all the = .ini-settings ever did. It basically creates two languages in one and I won't be able to = determine what $a =3D=3D 42 exactly does without having to look at the header of the file. I'm inclined to say that if you want to make PHP a new language with a = new core type concept then you should fork it and call it something else = to avoid confusion. - Chris