Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18712 invoked from network); 17 Oct 2013 18:16:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2013 18:16:22 -0000 Authentication-Results: pb1.pair.com header.from=jdavidlists@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jdavidlists@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: jdavidlists@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-ie0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:53199] helo=mail-ie0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/36-12663-57920625 for ; Thu, 17 Oct 2013 14:16:22 -0400 Received: by mail-ie0-f180.google.com with SMTP id e14so4424994iej.39 for ; Thu, 17 Oct 2013 11:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=hxenU2SvW91xx9VLHmARuKce7fluPfDbKfrhrzmEYiE=; b=PwFcGHCBWNvfV6pyhj2jud0Kr0Ql0fTcuh8lL83a8Yj1qCxWjc2NnUpLLD1pSD30k1 wNxyk0iUl9YCJGBuOiQPTwuDchjG/vafxphbt8hjj+AjcVVjyP7KalQ2bKLLXQb6kDL6 tFjeo1S4d8Yk9tUQe5RQDv3pw0w8G2Cm8AHOoC7RG2FImTVB9PWOS2WjsDZFPHz9vXdz V4FZxtz0yxHr45vIxyHXv+EsN87BCSCqG6JGMVKAdjDjFAUO88Vnu0jymXWy2dGWyiXx w3N0xaYMcqiEk7SoHuwOmaYCs2TsilLS5rALHedEOZHaRKc57Ge711b3QM4XqKaj7vBw IYyA== MIME-Version: 1.0 X-Received: by 10.43.20.74 with SMTP id qn10mr1328450icb.65.1382033778423; Thu, 17 Oct 2013 11:16:18 -0700 (PDT) Sender: jdavidlists@gmail.com Received: by 10.43.180.131 with HTTP; Thu, 17 Oct 2013 11:16:18 -0700 (PDT) In-Reply-To: <526023DF.6080203@ajf.me> References: <525FC834.4060501@php.net> <1534105.bNC2os93J1@rofl> <525FDAC3.6060103@php.net> <526023DF.6080203@ajf.me> Date: Thu, 17 Oct 2013 14:16:18 -0400 X-Google-Sender-Auth: _H7KydZhwWzVncsTVxkdL9ezx3M Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Assertions From: j.david.lists@gmail.com (J David) On Thu, Oct 17, 2013 at 1:52 PM, Andrea Faulds wrote: > In addition to all that you've said, I should point out that both Java an= d > Python have an assert statement which raises an exception, which happens = to > be called AssertionError in both languages. And in Python you can subclass an int. This does not make that a good idea for PHP. (Java only wishes it could subclass int, hence Integer.) In Java, for better or for worse, every error is an exception. This does not make that a good idea for PHP. (Shrill voice) "If all your friends jumped off a bridge=85" Should require($myFile) throw an exception too? (Some people, perhaps many, would say yes.) What about parse errors in a file include()d at runtime? Thanks!