Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11098 invoked from network); 2 Mar 2015 03:48:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 03:48:35 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.181 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.181 mail-pd0-f181.google.com Received: from [209.85.192.181] ([209.85.192.181:35643] helo=mail-pd0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/00-10542-29DD3F45 for ; Sun, 01 Mar 2015 22:48:34 -0500 Received: by pdbft15 with SMTP id ft15so10396557pdb.2 for ; Sun, 01 Mar 2015 19:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=lPvDBUlUSr2MYPIkHE1APnMyMbvN0gDV905A+Ki3p3I=; b=Yf0aBqpW+GIUI6uVdRn6/2rre8/oB+Ee+aU6VbjVGgxayScpFmNHj7sOBebdYBKpnN Q5VcNTWpUMuPzae0ZgWbKxsyx6PrZmEOrRtsisTN1kr4T6xfCo5SQrguIPnIXTDpHGip jhHDBFI7Z65uePeKotVPgMvuAIK2EuKEJhbmDB9Ze5ftB8QSb4Gr07JJlXFtk2pC5N8w wcTHo2NKypR+pAtvR+HzGWMOOUZr8bNTnAv6qDL9MCYQFZ6Hdee34ATzO5qQ0RDuce0f t3E2T9MdnFuRuREBMdw85aWZsPUs805qm/QihNAiDlO6sxzQwzXHqs5ZQiwSg188nNzi lpOw== X-Received: by 10.68.221.231 with SMTP id qh7mr13732054pbc.154.1425268111708; Sun, 01 Mar 2015 19:48:31 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id qo4sm10330045pdb.71.2015.03.01.19.48.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Mar 2015 19:48:31 -0800 (PST) Message-ID: <54F3DD8E.2050307@gmail.com> Date: Sun, 01 Mar 2015 19:48:30 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Yasuo Ohgaki CC: Dan Ackroyd , "internals@lists.php.net" References: <54F38D29.9080007@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > This proposal is about code modularization. Software engineering is > a history of better modularization. > > - Structured programming > - Object Oriented programming > - AOP > - DbC > > Exception is one of them. I'm sorry, I have hard time understanding what exceptions have to do with modularization. Modularization is in my book creating a stand-alone reusable software components that are responsible for distinct task or set of tasks and have a well-defined API for that. I don't see where exceptions fit here. > While error handling without exception works, it decreases modularization. I don't see how. In what aspects and by what modularization is decreased? > Besides modularization, consistency is important for programming > language also. Consistency is important, true. But I don't see why there's less consistency in producing null values. On the contrary, the situation where the same operation called via factory method can produce null result, but literally exactly the same code called in different way via "new" operator can not and would produce exception instead - doesn't seem very consistent to me. -- Stas Malyshev smalyshev@gmail.com