Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94883 invoked from network); 19 Apr 2016 16:28:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 16:28:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=codekestrel@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=codekestrel@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: codekestrel@googlemail.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:35893] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/F0-22821-EBC56175 for ; Tue, 19 Apr 2016 12:28:47 -0400 Received: by mail-wm0-f51.google.com with SMTP id v188so169456593wme.1 for ; Tue, 19 Apr 2016 09:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=iFqTCuGInkiKXF76+MBdZN2pyH2jyQUjlSd1TG+4ixA=; b=DbyUl6/zfQ8IrG6lYX5v+anmatI1u2QGe5p/mJpD6ObbkNKCLR+NMWe84Uyl79dFct UYXjyNRDMTwpr5cuDRKQAKgwYORljyQ0MYpbv5PNKcKRCLm/MRjcQQgDcqnxnUuzDkok QM6P+CZJa0D8oee0TrSiQq9l2CvlNPy370URbkBwZ2lw3nFuq1tTv87qa7QU9iXOtrRB kYQv7zbDpHoIk93Y9QZcxEfKejc4V+O9JUFed7rlol6ptUvqCpqrUppaqAP6s2pP9QZz 9hUUuRSK+YOeUqvRlopZRrXvksrEnSRVSUVIodRBYJGPNjubUoRrJknj4VtENd0MXh38 2DEQ== 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=iFqTCuGInkiKXF76+MBdZN2pyH2jyQUjlSd1TG+4ixA=; b=jJ1cMHpzr0NF2e+yFdRzKdj79JkgrjQ1khGE/3IkVFG3VUVWZND/nrc6J6oIhtNOQ4 xXzJiZ5CJzDZevzn/PPlBB2Q7+8vP2HUL8SedgdVLM3dktgpMsN9YuUij5Y6netvafYI z3uVFtqcV0PWPc8nhrj6qF9g7bKT0xi8p1XHNyGxEdU2Bsu//T+DnMXenkLTAC5lXAs0 cQwEKUr6x03JOrdIVhc0WuB66TX3S2bTuEaBKYSywXzfqi/jKO3ALCrbhLvLKKdzbYcU WVBYtkptYCDFUxbjUk9ZmRyxV/oE7GmXHBifwm9JsCyuKgCwbsiJdlp8X9yyThDKpag2 cdHQ== X-Gm-Message-State: AOPr4FXesmsfxWym+8YuiYzcudutoHyciCsyc3kfS+mNcc3MqCO75qYOF/zfOLRchFVxMAeZ37vM9QlyhB0Urw== MIME-Version: 1.0 X-Received: by 10.194.96.10 with SMTP id do10mr4655655wjb.113.1461083324170; Tue, 19 Apr 2016 09:28:44 -0700 (PDT) Received: by 10.28.140.10 with HTTP; Tue, 19 Apr 2016 09:28:43 -0700 (PDT) Received: by 10.28.140.10 with HTTP; Tue, 19 Apr 2016 09:28:43 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Apr 2016 17:28:43 +0100 Message-ID: To: Josh Di Fabio Cc: PHP internals , "Ben Scholzen 'DASPRiD'" , Rasmus Schultz Content-Type: multipart/alternative; boundary=047d7beba2b0864a2c0530d8f857 Subject: Re: [PHP-DEV] [RFC:generics] From: codekestrel@googlemail.com (Dominic Grostate) --047d7beba2b0864a2c0530d8f857 Content-Type: text/plain; charset=UTF-8 We would really like some feedback on this. We know it is a massive feature, but we have put in quite a lot of research in both the language implications and implementation challenges. Please ask any questions you have. Thanks. On 18 Apr 2016 11:24 a.m., "Josh Di Fabio" wrote: > On Mon, Apr 18, 2016 at 10:47 AM, Josh Di Fabio > wrote: > > 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? > > Ignore me, I didn't read the example properly. > --047d7beba2b0864a2c0530d8f857--