Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2701 invoked from network); 18 Apr 2016 10:24:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2016 10:24:18 -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.218.48 as permitted sender) X-PHP-List-Original-Sender: joshdifabio@gmail.com X-Host-Fingerprint: 209.85.218.48 mail-oi0-f48.google.com Received: from [209.85.218.48] ([209.85.218.48:36330] helo=mail-oi0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/64-11975-0D5B4175 for ; Mon, 18 Apr 2016 06:24:17 -0400 Received: by mail-oi0-f48.google.com with SMTP id x201so20154920oif.3 for ; Mon, 18 Apr 2016 03:24:16 -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=NUqIDCIFdgJqRhrmA1G5mPxxg1553C5dUFbPREvNDqo=; b=rxcTkWZvxOX/zyQv0KIZjVYEOvFm6ztscZg6SfrNeaeXC1rEwtur4/VYMGq/0LzRYr 5C3J6wkz8iASz8ztHBNsVHZMWX4+vqBIIG4+pp6s5YJuZSwgNHJuqGTGcWqN9DOAtWst oNTEfIUuGswxsMLF+lYvQjoroDHDXjtnHcmaHyVTrN5/y/YOXBSF4LWiowP34R3X2OCv dWy42dRVsO4ZoEO5EmBYHWsEv42VWQZzxSDU//2FYd2BzOGmpioitzLc41gpH+4Abn8y 3/4Hs5MWWvSv7Bi8ZMPZu3QI4AQ60xa2QLDxXbeiZVP2Vnj7H4Su8SBBydgPRQRMRMaf 0nIA== 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=NUqIDCIFdgJqRhrmA1G5mPxxg1553C5dUFbPREvNDqo=; b=YC9MJApEVcMEZlW358vcnSR50FybsnWbeidkZl/kGQX4BkC4ZGCTmcy9chRdWzDRxU ucF15PFN7ztmQuMgzsLxD3tPhd7yNi29enhX/eryGlVu5hm66znuE1eB092XC5GGrDEd cSGI8mr1voGLJmldaf62OVxHW+OyAk0C9I9/+CT4aLCDnjsr7zxY3LgStcyVgmGTIjgT 2Ng0HKdGkpFWyvc8i5s6un6244J/2gDw/0bqv5Ly+UefoWLld0JmFARxK6JEF1hfyF3W /c2Qn7aZF+pfBnPhziUUjHflFW4q5GvGTvB88lP8+wkQfVUeEufZIxcCVxjai4uRBTQC Ojdw== X-Gm-Message-State: AOPr4FXn/BCX9AUmf8go/d9CPWr8vP8Y72Tp8IC3RRB5Hk3e8EDEqQboc5sIEbckSe9CHX9ZE+mdW9JoUGHhlg== MIME-Version: 1.0 X-Received: by 10.157.40.242 with SMTP id s105mr2350922ota.68.1460975053778; Mon, 18 Apr 2016 03:24:13 -0700 (PDT) Received: by 10.202.78.134 with HTTP; Mon, 18 Apr 2016 03:24:13 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Apr 2016 11:24:13 +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 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.