Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87601 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41873 invoked from network); 4 Aug 2015 12:06:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2015 12:06:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=peter.e.lind@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=peter.e.lind@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: peter.e.lind@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:38167] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/D2-24673-0DAA0C55 for ; Tue, 04 Aug 2015 08:06:41 -0400 Received: by wibxm9 with SMTP id xm9so20761607wib.1 for ; Tue, 04 Aug 2015 05:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=zl4sdZQ06wK9cNq2BODinAu1UQKYORSAI88KM8+87Bw=; b=JtPlt91z1kVNQtFsz14XWvl00dUQkJaNa35os7r+d/QEg8qJIe888mjfaAZYUN6pg2 M42gQ8JJsrVkP6/LjrhF6JAoIPuMFAyHnKyFciCKAsKU7VjJoia0tDrpG2fe46z3xDxa IPZKFooJvRfBzOVMOy1YdNnEhLDRVyUlmBpomz3WHFW+DZcqxBl+BNG8nYA15VONU+h5 rfS0w7b+qKq4xMZxsUypQO5CsPLa4wq6sT2OJU5wOMy3wF1HVSpPIgi7KxHTFQGFQ0Mz 2emFlmVduFwPQ9Q3TbkpBgYeFGEa4AlMFyP818rKSj2Wf84xx74LKQ7vNc1kbNDAw7c/ 1uAw== X-Received: by 10.180.78.35 with SMTP id y3mr44415487wiw.62.1438689997632; Tue, 04 Aug 2015 05:06:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.229.18 with HTTP; Tue, 4 Aug 2015 05:06:18 -0700 (PDT) In-Reply-To: References: <9996b5784a1bfbca80b07de01f1a7a94@k-piste.dy.fi> Date: Tue, 4 Aug 2015 14:06:18 +0200 Message-ID: To: Scott Arciszewski Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d043c7b84403f4d051c7b1ea9 Subject: Re: [PHP-DEV] PHP 7.1 Cryptography Projects From: peter.e.lind@gmail.com (Peter Lind) --f46d043c7b84403f4d051c7b1ea9 Content-Type: text/plain; charset=UTF-8 On 4 August 2015 at 13:56, Scott Arciszewski wrote: > > Hi Peter, > > It's not really a "made-up string format", in the sense that it has a > precedent (PDO). > > True, and that format sucks royally. It trips people up. Combining several arguments into one string is bad design. If it was good design, you'd see userland code using it all over the place. > Hopefully my response to Lauri makes this design decision seem more > reasonable. > No, quite the opposite. You're arguing that this: new \Namespace\Class(":cipher=AES-256;mode=GCM"); is easier to work with than: new \Namespace\Class(null, 'AES-256', 'GCM'); Or possibly $config = new \Namespace\ConfigClass(); $config->setCipher('AES-256') ->setMode('GCM'); $crypto = new \Namespace\Class($config); Your parameter layout may be easier for you to deal with, but all the people you're trying to help with this will be worse off for it. PDOs constructor has only lead to more debugging, not better code (unlike the rest of PDO). Regards Peter --f46d043c7b84403f4d051c7b1ea9--