Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68382 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16962 invoked from network); 5 Aug 2013 14:57:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2013 14:57:37 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.178 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.178 mail-ve0-f178.google.com Received: from [209.85.128.178] ([209.85.128.178:46954] helo=mail-ve0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/02-06453-06DBFF15 for ; Mon, 05 Aug 2013 10:57:37 -0400 Received: by mail-ve0-f178.google.com with SMTP id ox1so3166014veb.37 for ; Mon, 05 Aug 2013 07:57:34 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=MRyBk1wHmeXxXyZbiiygjLVzKS9S/IO9exzw2efrFAI=; b=qlohoE6cDSaqlX5o1lAfRfhP0JEg2ncPwitBIGtuaQs6d2vmnR6GsvtF+DFVxV8Y7B K9ZhezxSKxs3WRU91RKtgltyjIhlfJPw8q/VfJvmJvNx7XzU5P3ZttOvgOu4oMccYy0i 1u1pLDkVvy0OBaIxnD9rwnWbypUrKZyryTyclMhwCPoDExTAqWUWuKCxddnWusGZA4SN 9kuclvudQV1GXc+r0N40viGIUMy7lBWTxKgeADL5d8I+D0JcRiRr5YiVbr51rRpzZjuB os6LlcBu9w3TeMfL5ThfJbJr9J36ykoDRFZfd5txcdceXsGAwfgqr8WfZhM42ReUoxcp Fhjw== X-Received: by 10.58.217.167 with SMTP id oz7mr5799029vec.15.1375714654216; Mon, 05 Aug 2013 07:57:34 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.142.12 with HTTP; Mon, 5 Aug 2013 07:56:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Aug 2013 16:56:54 +0200 X-Google-Sender-Auth: nd27l9O-nIe98V7nNR_6lyLI-ys Message-ID: To: Levi Morrison Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7bd6adfe46e8a104e334877a Subject: Re: [PHP-DEV] Refactored magic methods From: jpauli@php.net (Julien Pauli) --047d7bd6adfe46e8a104e334877a Content-Type: text/plain; charset=ISO-8859-1 On Fri, Aug 2, 2013 at 9:55 PM, Levi Morrison wrote: > If you have ideas or things to say, I'm listening. >> https://github.com/jpauli/php-src/compare/macroing > > > Is there a reason you switched from names like `__toString` to > `__tostring` (https://github.com/jpauli/php-src/compare/macroing#L2R12)? > Yes because I use the same word for structure members access and for error message. That makes the refactoring takes place actually, if I had to change just one letter to capitalize it for just one method, that would add lots of code just for treating that particular case :-p > > > Visually the macros clean things up a lot and better convey the intent > behind the if / else if chain. However, I don't really like having a macro > that works off of an `ELSE`, it just feels wrong. I don't have a better > suggestion though. > Yes elses inside macros are not a good idea, I pushed a different implementation having elses out of macro definitions. Julien.Pauli --047d7bd6adfe46e8a104e334877a--