Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49538 invoked from network); 22 Oct 2013 17:57:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2013 17:57:22 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.169 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.169 mail-ie0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:54640] helo=mail-ie0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/09-10840-18CB6625 for ; Tue, 22 Oct 2013 13:57:22 -0400 Received: by mail-ie0-f169.google.com with SMTP id ar20so2440198iec.28 for ; Tue, 22 Oct 2013 10:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=OoVdkNnClaHjMszYw3AE054xY8++629DmAn2vfpoOsQ=; b=J+yN0LApChzaS+WvPhrEe07EsG8Qja7bl2fip9FUz1DjmQow6hd6bym2i52iRFw3gh 6yWClDQbTjSl0gMzh3F9yPvHQSKGO8xk6FxvD+L1NdttwY5d/SV76MHn1LWUXT4turTY YfQnncbv4IF2tpfQC9DXH/k2PFJM94V6TjDR8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=OoVdkNnClaHjMszYw3AE054xY8++629DmAn2vfpoOsQ=; b=gwW+Ipr3quF+/c9VQZsOjQaSgQEy/RJUkRkfudJcKWALRV4q48ajQIgH+JEOA7qKNO Vge8wnl/qYfdM7eZvt2tCxUp7LBmoZC6lUCfqFTOc7DOFI5EcK6lm4tBQIXXLpHEo0DB XLYjowAieM51wj8LpDgbAzC4hBeQLyYDqRJb/DM4g4s0kgAu0/86qoB2WTeCh5HlAoAl CAfer2kRvjRh56w5en7vI1oJqQHXfCx4eJ7C5P9AKimBTpqo8vKtW8ZyIQC7QiYAsILK WK7qhGBRwl0i7j/Q9uzvhkaPvhAqFDfWB1QE+F44rTTMbxR9XMcLH33hYzlZGDCbVItK d8mw== X-Gm-Message-State: ALoCoQlQDDbf8LfyyMA37M2ySGmKRtCAnpazxB+X8UX6pX5yWtC2/+yj2ZHXilbx5Tkwkrvhz27o X-Received: by 10.50.238.196 with SMTP id vm4mr14328660igc.43.1382464639043; Tue, 22 Oct 2013 10:57:19 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.42.206.208 with HTTP; Tue, 22 Oct 2013 10:56:58 -0700 (PDT) In-Reply-To: <5266B6A8.4010607@pthreads.org> References: <3D.BC.23638.84CA1625@pb1.pair.com> <5264FE65.8050808@php.net> <5266B6A8.4010607@pthreads.org> Date: Tue, 22 Oct 2013 10:56:58 -0700 X-Google-Sender-Auth: dK4MMu9cmcf_Btc0fkOuJWCGP8w Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Expectations From: aharvey@php.net (Adam Harvey) On 22 October 2013 10:32, Joe Watkins wrote: > On 10/22/2013 06:20 PM, Adam Harvey wrote: >> I agree that something to replace the eval-based assert() would be >> good. What if the new syntax simply respected assert_options(), and >> assert_options() was extended to support an explicit ASSERT_EXCEPTION >> control option (that presumably took an exception class name as its >> option value)? That seems like it would provide the exception based >> possibilities that some posters want while maintaining the same >> assertion behaviour that users are already used to by default. > > I'm a bit perplexed at the need to retain any compatibility with what is = a > poor implementation ? To be fair, I think part of the disconnect here is that I don't feel like the current implementation is particularly poor besides the eval-based API. I don't really want an assertion failure to throw an exception =E2=80=94 if I did, I'd use an assert callback or ErrorException = to do that. I want it logged so I can look at it later, and that's easily configured with the current assertion setup. I guess I'm wondering if there's a middle ground here, rather than throwing the assertion baby out with the bathwater in favour of an entirely new thing that could simply be syntax sugar sprinkled over an existing, working implementation. Adam