Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45229 invoked from network); 21 Jan 2014 20:47:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jan 2014 20:47:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain strojny.net from 46.4.40.248 cause and error) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 46.4.40.248 milch.schokokeks.org Received: from [46.4.40.248] ([46.4.40.248:36287] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/90-40896-8FCDED25 for ; Tue, 21 Jan 2014 15:47:53 -0500 Received: from lstrojnypro4.fritz.box (ppp-93-104-76-237.dynamic.mnet-online.de [::ffff:93.104.76.237]) (AUTH: PLAIN lars@schokokeks.org, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by milch.schokokeks.org with ESMTPSA; Tue, 21 Jan 2014 21:47:43 +0100 id 0000000000000011.0000000052DEDCEF.00001268 Content-Type: multipart/signed; boundary="Apple-Mail=_DF916B31-89BC-4A7D-9A9B-173FA4BDAD22"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) In-Reply-To: <52DED5B5.9050905@ajf.me> Date: Tue, 21 Jan 2014 21:47:42 +0100 Cc: Yasuo Ohgaki , PHP internals Message-ID: References: <52DDBAE5.2010803@ajf.me> <52DED5B5.9050905@ajf.me> To: Andrea Faulds X-Mailer: Apple Mail (2.1827) Subject: Re: [PHP-DEV] [VOTE] [RFC] Alphanumeric Decrement From: lars@strojny.net (Lars Strojny) --Apple-Mail=_DF916B31-89BC-4A7D-9A9B-173FA4BDAD22 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 I would rather introduce a deprecation warning for decrementing (and = incrementing) alphanumeric strings. It=92s just very bad behaviour and = using chr() and ord() is not that hard :) cu, Lars On 21 Jan 2014, at 21:16, Andrea Faulds wrote: >=20 >=20 > On 21/01/14 19:12, Yasuo Ohgaki wrote: >> Added this RFC to keep track inconsistency. >>=20 >> https://wiki.php.net/rfc/comparison_inconsistency >>=20 >> Python/Ruby does not even have ++/--. >> Mixing string and number raises type error for these languages. >> Perl returns -1 for string-- always. >>=20 >> Although behavior became more consistent than now, but >> I'm not sure if this change is good or not. >> Keeping current behavior might be better. >=20 > This would also be my preferred approach. My RFC is one approach to = resolving the inconsistency, but it's not what I really want, in truth. = I'd like something like that you're proposing. >=20 > However I think type juggling is entirely misguided, and should we do = it at all, int -> string and float -> string should be one-way = conversions. Doing the reverse seems like a bad idea to me. >=20 > --=20 > Andrea Faulds > http://ajf.me/ >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 --Apple-Mail=_DF916B31-89BC-4A7D-9A9B-173FA4BDAD22 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIVAwUBUt7c7iQPF+sCY6wHAQLPLg//Zgv/Wc16YezGbF3UJY+Ah62fdNbRPDjf z+KT9TuknauIVuSV97EYm7SEpj/b38cb6ntcbjGm3KgHhtjPKVpgv3xsf6EKi75c uMlxQNiQo1FniiKLVci/59TC1n29eNbYrCuGSulQ99ouPzjzAIEucVjSV3xfZBUP mEs3zkfsmdorF3gvvIyQl16Hxmxn+43cxbx8oLMedcB8V3/k+YSEYdA2bT9/ie7G YR7UJdQ4ijfZpnxBLOCR97XZdLhXEUGWiuNXS+KrZAeTKHc8jFg9ayUpwHHiP/xh Z/HX9MKrv8zhuXdfMV3t5cwoIYrRBIssCR7i6xbWbbd3Xxoj55RRDTPSGtiIhF3t lpLSPJP4TAzzXZOz+mI3wOhL9sRfkaq5D39F7aAo/l5RV61fhjp/gWRWcnZyGgTZ MPuHhmTOwE/EXNtwSuegI8qTTLQ40IgPirqRlRhujWFAIMvWNkJPBx/yQv5IeuIw 4RhOeTNPKuzx2YjI73sXQGHEro4Cdcqm/x9DSd6RePkhcYmsAD2Bm/SaZETF5fiH UP1OaCzf+dG4rwqYaU9X0jdKjL1EbJF1GeXmGtfTj+s0wX0rByxAjA+3sW6HimAA 37WSyqeilhADumfFPRqHXGUEz9maK6C0/D/1u6NzTCM5lBbH2aD65PqyTGOWWtEo fE1SGkcRlPs= =IiUR -----END PGP SIGNATURE----- --Apple-Mail=_DF916B31-89BC-4A7D-9A9B-173FA4BDAD22--