Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98024 invoked from network); 18 Apr 2016 09:47:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2016 09:47:06 -0000 Authentication-Results: pb1.pair.com header.from=joshdifabio@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=joshdifabio@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.196 as permitted sender) X-PHP-List-Original-Sender: joshdifabio@gmail.com X-Host-Fingerprint: 209.85.214.196 mail-ob0-f196.google.com Received: from [209.85.214.196] ([209.85.214.196:35869] helo=mail-ob0-f196.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/83-11975-61DA4175 for ; Mon, 18 Apr 2016 05:47:04 -0400 Received: by mail-ob0-f196.google.com with SMTP id ds1so3902765obc.3 for ; Mon, 18 Apr 2016 02:47:02 -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; bh=YKijeGmxp2JgMIs4kH8v2DGD8nL6wlNrZG97HHkMmRQ=; b=dZ4XaRhkZq+WiAUrS0ji565nbFcXWYeP0duuXw3qctrKJOO51bkdmFTfEz8/CABC23 wSec8CEZlqG+zXMb2g/wxPcUTP7slHE0AJYu9X4eeuYxtaeoZdXR1o0C7hN5Bn7Buj+B 4WZTo7en7IX+Oazf/QB2A68ITCMYHzMOyXxFKz3kYyVaLM+AbZY/aqNcAu4TL4jVfILk fo3HJhe0aZI3bdt/iG/AxzwrEx+tEejUkoN2CecjIz5VIZ/hLq90nPmwiNlClC/x1KFJ unVzHfCUE3JQpahsSWD8YMv64/5c0IshT3Nmj7c2AnpeoUg7k1ADMNUXEOx2ZFi5xd/I WE1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=YKijeGmxp2JgMIs4kH8v2DGD8nL6wlNrZG97HHkMmRQ=; b=NA8QiPg0h3F7YgkgMFrZRv+MXUYcR92kMuJV8Q3vha/jSvumoEgJ6Hu0c4FKpJCPC8 qOWTvpRpuULqpcu8oALIFQ6FUyC22/+SxG6KJcGzVdDWTfxFzAJE5ggDuvoTqznlAhJK IdPk2PVoerzuxWkrWmejprvzi7RHRTnkSrnB10E0n1/rvkP0wrxBPMxZcitMT8ZKtSSD z2crVCbBrz1DRiAT3CqEP/RS9ZE8Zq7/5EqBFMPe1vBWTVN6c3eVRHY6U7x730ynfjGI KQaCOzQ1pQZ/3bmxM2vWs9MV9GQbozjeHLFYixGEdXPZx5+7cZ2TI9F74A2BCBun2Zfo Twsg== X-Gm-Message-State: AOPr4FWmGAQj8awrgDgfp4pyzkaPfsu3iWEgFFkBuOjjiNSK7Jw2WzGHluDSaFTtpRkRh4H53iyIIpU3sM1Ucg== MIME-Version: 1.0 X-Received: by 10.60.150.235 with SMTP id ul11mr15593925oeb.70.1460972820437; Mon, 18 Apr 2016 02:47:00 -0700 (PDT) Received: by 10.202.78.134 with HTTP; Mon, 18 Apr 2016 02:47:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Apr 2016 10:47:00 +0100 Message-ID: To: Rasmus Schultz Cc: PHP internals , Ben Scholzen , Dominic Grostate Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC:generics] From: joshdifabio@gmail.com (Josh Di Fabio) On Mon, Apr 18, 2016 at 6:20 AM, Rasmus Schultz wrote: > Hello internals, > > I'd like to introduce an RFC proposing the addition of generic types > and functions: > > https://wiki.php.net/rfc/generics > > Ben Scholzen started this RFC as a quick draft with a few code samples > in August last year, and I have since then worked with Dominic and > Ben towards a more complete, detailed RFC. > > There are a few holes still, which is why it hasn't moved from Draft > to Under Discussion yet, but we feel that it's complete enough that > we can start a discussion about this feature and try to iron out > the remaining details. > > The RFC was previously "unofficially" announced on reddit - this > thread generated some good questions and may answer some of the > most immediate questions: > > https://www.reddit.com/r/PHP/comments/3zx8qs/php_rfcgenerics_update_03_please_comment/ > > One of the most common criticisms we've heard, is that the syntax > would be hard to implement, a few have said "impossible" - but we feel > that, if generics are introduced, it's important that the syntax and > features be as familiar as possible to developers who are experienced > with other mainstream web industry languages, such as C# and Java. > > To that end, Dominic Grostate has worked through most of the tokenizer/parser > issues - save for one very exotic edge case, his fork demonstrates that the > proposed syntax can be parsed: > > https://github.com/orolyn/php-src/commits/generics > > Note that this fork is by no means an implementation of generics - it is proof > of concept as far as being able to parse the syntax. > > We're hoping to find someone, with more experience working on the php codebase, > who is willing to collaborate on further implementation - and we do also have > a partial test-suite, defining the big picture expectations for most of the > proposed language features: > > https://github.com/orolyn/php-src/tree/generics-tests/Zend/tests/generics > > We look forward to your comments, questions and (I'm sure) criticisms of > this proposal! > > Thank You, > > Regards, > Rasmus Schultz > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Nice work. I think you there's a typo in one of your examples: write(new Entry(1, 2)); // throws a TypeError Presumably this should be or something similar?