Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90669 invoked from network); 23 Nov 2011 10:27:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 10:27:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:64182] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/00-24303-28ACCCE4 for ; Wed, 23 Nov 2011 05:27:14 -0500 Received: by ggnk1 with SMTP id k1so1371711ggn.29 for ; Wed, 23 Nov 2011 02:27:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hcyb/dNYSwHffb5nx5nEw4mGkRWw21H+nFXvVSvV42Q=; b=NYNlX1nF+cvsC5y+HLCYHSlXtyyo5xXihwJ9P52IaAV6Yep67wb5oPDtiUZDejzeaB OmHg9jb6UBFYkf+b7gkh25uOAzyaTDphEblrYTC+Hckr9oxsa2xhv1V4sOIUlbX1LKIq yrcyhEm4AezI0hwH5rgebWXxEMEPUqvf6UZWU= MIME-Version: 1.0 Received: by 10.236.201.137 with SMTP id b9mr32426098yho.124.1322044031451; Wed, 23 Nov 2011 02:27:11 -0800 (PST) Received: by 10.146.4.4 with HTTP; Wed, 23 Nov 2011 02:27:11 -0800 (PST) In-Reply-To: <4ECCBC37.9060106@sugarcrm.com> References: <4ECC9ABE.1010709@sugarcrm.com> <4ECCBC37.9060106@sugarcrm.com> Date: Wed, 23 Nov 2011 11:27:11 +0100 Message-ID: To: Stas Malyshev Cc: Gustavo Lopes , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] intl IDNA patch From: pierre.php@gmail.com (Pierre Joye) On Wed, Nov 23, 2011 at 10:26 AM, Stas Malyshev wrote: > I think yes, it's better to have one options set than "options" and "another > options which aren't first options but different options". I don't think > there's breaking of abstraction if we use more options that ICU has, and > probability of ICU using all 32 bits seems quite low for me now. > > I don't think we should return array there - it makes using the function > much more awkward since you need to check options before you know what it > returns. I think it's better to have normal return always a string, abnormal > can be handled by a special value if the user cares. yes, see my reply. We agreed that these functions should always return a string or false (on error). Which kind of action will be take is defined by the new argument, and possible errors can be returned using the last new argument (array by ref). It is however important to give the caller a way to deal with the possible warnings or errors. > Actually, that's what I was objecting to. I think mixed return (i.e. > function returning array or string depending on option) is not the best > option. That's not what we agreed on. I did not check the last version of the patch but we agreed on string|false only as return value :) Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org