Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39112 invoked from network); 1 Sep 2015 08:54:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2015 08:54:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.169 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.213.169 mail-ig0-f169.google.com Received: from [209.85.213.169] ([209.85.213.169:35068] helo=mail-ig0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/22-27722-0E765E55 for ; Tue, 01 Sep 2015 04:54:57 -0400 Received: by igbut12 with SMTP id ut12so45062127igb.0 for ; Tue, 01 Sep 2015 01:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sp4Pwmx6BKl18wTBaySd4SanXmGBlCkc4McV73u4lLo=; b=Ebxv+T9CMI2pZ5o+hZQmesagzgVxlT97OswXhGwJLtry+ZmV2isxNhLhbV4z2+C9H8 yeKfCHwiUktE1qte1qxfyiXGcgxSfJ9+vBceOzGW+C0fjpqmhXuk1JGzjoVte8IIZuTK UB87UrSGPa51LLOgsu6EGk9dNt/Ld2h7oSeglBOo2gaBxzqRZAXO5bzaBGuDv/wHentt 2vwLm2TStwZr1FICcxMAYS4l/GlHtqE+LbJJlvX8uTymK+A+T8aX68jahFD4S4Nz/tuI n1EACq0gvr3LvqxWa5Oy2Jd4uKyYK/MgWb5RIzJvRmFxJLoTFG9YdZU9Ln7d4ey69pfx KjGg== MIME-Version: 1.0 X-Received: by 10.50.79.230 with SMTP id m6mr1226197igx.86.1441097694464; Tue, 01 Sep 2015 01:54:54 -0700 (PDT) Received: by 10.107.24.194 with HTTP; Tue, 1 Sep 2015 01:54:54 -0700 (PDT) In-Reply-To: <55E4B9AA.9060906@dasprids.de> References: <55E4B9AA.9060906@dasprids.de> Date: Tue, 1 Sep 2015 10:54:54 +0200 Message-ID: To: "Ben Scholzen 'DASPRiD'" Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Generic classes and methods RFC From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Mon, Aug 31, 2015 at 10:31 PM, Ben Scholzen 'DASPRiD' wrote: > Hello, > > I've written up an RFC for supporting generic classes and methods in PHP, > and I'd love to hear your thoughts about it. > > https://wiki.php.net/rfc/generics > > Cheers, > -- > Ben Scholzen 'DASPRiD' > Community Review Team Member | mail@dasprids.de > Zend Framework | http://www.dasprids.de > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Hello, I would love to see generics in PHP, but I have a few questions for your RFC. class Bazz Why did you use this syntax for forcing extending/implementation? I know this is the syntax C# uses, but it doesn't fit PHP. I think it should be "extends" or "implements", because in PHP : has a different meaning. Also, how do you specify multiple constraints? Do you have any idea how it would work internally and if there was some performance hit while using generics, and if it would also slow down existing apps that don't use generics? I hope this RFC will have positive comments, and someone who is capable of writing C will help you out with it so there's a patch for people to review - because I'm not sure if this RFC can get anywhere without a patch. :( Regards Pavel Kouril