Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65187 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2468 invoked from network); 25 Jan 2013 18:55:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2013 18:55:28 -0000 Authentication-Results: pb1.pair.com header.from=seva.lapsha@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=seva.lapsha@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.171 as permitted sender) X-PHP-List-Original-Sender: seva.lapsha@gmail.com X-Host-Fingerprint: 209.85.215.171 mail-ea0-f171.google.com Received: from [209.85.215.171] ([209.85.215.171:55895] helo=mail-ea0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/54-14132-E15D2015 for ; Fri, 25 Jan 2013 13:55:27 -0500 Received: by mail-ea0-f171.google.com with SMTP id c13so294580eaa.30 for ; Fri, 25 Jan 2013 10:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Dz89RRXu4RswYYuuZ9CfDeKWfLwJiv8R+/LQHLsNK8M=; b=ZZPFhZE/+X7qqZp2UOZ7t0OY5yyJdFxoY0nlGOrrYz5DLJVLd99eUlirZ2z60oj+rh YGp0OtXEC+mWDIStoM+ecXO6KV6mN4e52t+VR3nxdNPi2fihSYvoq51KSv257UVEv9Oy ya93TZ0FRfQNBnisPCRYGjrTOzQ9DsUkW8EunUuOdmxwg1l9gJzrDxSAqDkQcQ9FjrxJ 4PoUq26CY8Xu3w9k44jaMpcxXIsEEh9EO0nujHHggvxXnlqf6Zx2dI1ppGowLvy5ELVC /jr2V+i2TrSDbagr2tFOcNxlpjTBvLdfCwLa/EkqdxiunkusUbJD8qLxGNUccb7/JUw+ nmtA== MIME-Version: 1.0 X-Received: by 10.14.2.5 with SMTP id 5mr20711808eee.30.1359140123508; Fri, 25 Jan 2013 10:55:23 -0800 (PST) Received: by 10.14.136.74 with HTTP; Fri, 25 Jan 2013 10:55:23 -0800 (PST) In-Reply-To: <5102D1DB.9060305@sugarcrm.com> References: <5102D1DB.9060305@sugarcrm.com> Date: Fri, 25 Jan 2013 13:55:23 -0500 Message-ID: To: Stas Malyshev Cc: =?ISO-8859-2?Q?Damian_Tylczy=F1ski?= , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b66f6c34300d004d42178b0 Subject: Re: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention From: seva.lapsha@gmail.com (Seva Lapsha) --047d7b66f6c34300d004d42178b0 Content-Type: text/plain; charset=ISO-8859-1 Well, how about renaming the functions, create aliases for BC and throw E_DEPRECATED or E_STRICT on their usage? And write a PEAR script bundled with the distribution to migrate to the new convention? On Fri, Jan 25, 2013 at 1:41 PM, Stas Malyshev wrote: > Hi! > > > I've seen discussion on reddit > > > http://www.reddit.com/r/PHP/comments/174qng/lets_make_phps_function_names_consistent/ > > where many people are surprised why PHP can't have this done. Why > > inconsistency is something that we want to keep because of backward > > compatibility. PHP already introduced many backward compatibility > > I don't think you can just hand-wave the issue away by saying "PHP > introduced BC breaks". First, PHP practically never introduced BC breaks > that breaks almost all existing code. Even when we did huge changes - > like OO model change - we had compatibility mode for a long time, and > that considering in most scenarios it still worked the same. BC breaks > happened, but they mattered only in some specific scenarios and usually > this was done because old way of doing it could no longer be practically > used or lead to bigger problems than BC (such as security issues or > frequent hard-to-find bugs). > > Second, here we have breakage that would happen just for the sake of > satisfying some people that thing having or not having underscore in > function name really matters. For 99% of people out there, it does not. > I agree it'd be nice if we came back in time and wrote function naming > standard before PHP functions were implemented. But since we can't go > back in time, we have to choose between things that matter to most of > people - e.g., compatibility and code that keeps working when upgrading > to next PHP version - against naming beauty that doesn't matter for most > of them. I agree that beautiful is better than ugly. But, ugly but > working is better than beautiful but broken. > > > names were created by some crazy "let's imagine some name and don't > > look at API we have" man? Why we can't have PHP 6 that will be not > > some amazingly featured-packed version but version with API that > > just... makes sense. > > Because there would be zero incentive to upgrade to it for any current > user. You'd have to rewrite and retest your code with zero benefit. And > you'd have to maintain two codebases from now on for any application > that is supposed to run on both, or resort to all kinds of trickery to > keep it working. As someone working with 600K+ LOC code base, I don't > see doing that as something I'm eagerly waiting for. Then the question > is - why would we release a version that 99% of existing users would > hate to use? > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7b66f6c34300d004d42178b0--