Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88162 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93231 invoked from network); 12 Sep 2015 10:24:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2015 10:24:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@dennis.birkholz.biz; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@dennis.birkholz.biz; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain dennis.birkholz.biz does not designate 144.76.185.252 as permitted sender) X-PHP-List-Original-Sender: php@dennis.birkholz.biz X-Host-Fingerprint: 144.76.185.252 mx01.nexxes.net Received: from [144.76.185.252] ([144.76.185.252:37244] helo=mx01.nexxes.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/B5-37684-27DF3F55 for ; Sat, 12 Sep 2015 06:24:51 -0400 Received: from [137.226.183.192] (ip3192.saw.rwth-aachen.de [137.226.183.192]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: db220660-p0g-1@packages.nexxes.net) by mx01.nexxes.net (Postfix) with ESMTPSA id C766F48249C; Sat, 12 Sep 2015 12:24:46 +0200 (CEST) To: Ben Scholzen 'DASPRiD' , internals@lists.php.net References: <55E4B9AA.9060906@dasprids.de> <55F3F860.5000705@dennis.birkholz.biz> X-Enigmail-Draft-Status: N1110 Message-ID: <55F3FD6E.2040904@dennis.birkholz.biz> Date: Sat, 12 Sep 2015 12:24:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55F3F860.5000705@dennis.birkholz.biz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Generic classes and methods RFC From: php@dennis.birkholz.biz (Dennis Birkholz) Am 12.09.2015 um 12:03 schrieb Dennis Birkholz: > Hi together, > > 1. If we require some keyword instead of the colon to limit which types > the type placeholders can have I would choose: > class Foo {} Just to save you some lookups in the Hack documentation: 1. Hack uses the "as" keyword: class Foo {} 2. It does not allow to require multiple types for T1: "Currently, Hack only allows one constraint on a type or a method." 3. I found no example that Hack allows multiple type parameters like class Foo but also nothing that it is not possible 4. All type parameters must start with a capital T 5. Hack has generic methods 6. Hack has generic traits which we should also consider/specify how they work exactly. Greets Dennis