Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99469 invoked from network); 26 Jan 2013 11:45:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2013 11:45:22 -0000 Authentication-Results: pb1.pair.com header.from=thbley@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=thbley@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.41 as permitted sender) X-PHP-List-Original-Sender: thbley@gmail.com X-Host-Fingerprint: 209.85.210.41 mail-da0-f41.google.com Received: from [209.85.210.41] ([209.85.210.41:55498] helo=mail-da0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/00-33516-1D1C3015 for ; Sat, 26 Jan 2013 06:45:21 -0500 Received: by mail-da0-f41.google.com with SMTP id e20so553222dak.14 for ; Sat, 26 Jan 2013 03:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=1cMZZhDeb7fOkK3O794qXj4EiUqDUxXzDC1hJSUAeUs=; b=dCTrz4tFlx1NuBzK2WxOK2imgH696iX90yLfyScHsW1wX1rje1oX2gtVuVRvCh+K/1 TdEF2Epoyv5aiOpp+fYDadfkLNWuwwKmJQQetsRK4E/Tz+ZrkPBEXOvrSB9IAKjMvCWQ wg6FKfQcuFsJYlx52FKNLZiEZvJBCDXlsYOJzwzqq1Vlz5IWdN+jVuqfQtLHIozYvUDE EYuMbNV5tU3nRnNqcWF/Ljlzbia6jsNxbsV92plMettJyj8/swIbz0uZZO1vpYjmFiLf G3HG7SKWPC1h/nhDSjpjZp/qMucnXSS7hrFdszGxK4FtiyGoSNKLbagQzXje+8tVtdu1 Me5A== MIME-Version: 1.0 X-Received: by 10.68.192.66 with SMTP id he2mr21624775pbc.112.1359200243971; Sat, 26 Jan 2013 03:37:23 -0800 (PST) Sender: thbley@gmail.com Received: by 10.68.233.40 with HTTP; Sat, 26 Jan 2013 03:37:23 -0800 (PST) In-Reply-To: References: <5102D1DB.9060305@sugarcrm.com> <51032B3C.7040608@sugarcrm.com> <51033962.1030805@zerocue.com> <510342CD.6020405@sugarcrm.com> <51039A95.6010307@lerdorf.com> Date: Sat, 26 Jan 2013 12:37:23 +0100 X-Google-Sender-Auth: ktdJX2I0rJkEocqxQ6LhDt4dXCE Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention From: thbley+php@gmail.com (Thomas Bley) > https://github.com/nikic/scalar_objects I think register_primitive_type_handler() is too exclusive: When I use 2 frameworks in the same code base, one might do register_primitive_type_handler('string', 'A\StringHandler') and the other might do register_primitive_type_handler('string', 'B\StringHandler') in the bootstrap. The result will be only the second one is working. Also I see more variations instead of a cleanup. Working with an IDE, register_primitive_type_handler requires type hints to use auto completion: register_primitive_type_handler('string', 'StringHandler'); /* @var $str StringHandler */ $str = 'foobar'; echo $str->length(); vs. $str = new StringHandler('foobar'); echo $str->length(); Regards, Thomas On Sat, Jan 26, 2013 at 11:45 AM, Pierre Joye wrote: > hi, > > On Sat, Jan 26, 2013 at 10:18 AM, Thomas Bley wrote: >> So function aliases, new open tag and deprecation are bad. What about >> the String class? >> I think there was some "Let's ... start exploring lighter and more >> approachable ways to attack Unicode" on internals ... > > Unicode is a totally different topic. I would suggest to look at intl > (ICU) extension for a start. > > Also about cleanup the APIs, take a look at this prototype: > > https://github.com/nikic/scalar_objects > > This is something that would be much cleaner and without BC problems. > > Cheers, > -- > Pierre > > @pierrejoye