Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76675 invoked from network); 29 Apr 2016 16:10:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2016 16:10:50 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wm0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:38218] helo=mail-wm0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/5F-26386-98783275 for ; Fri, 29 Apr 2016 12:10:50 -0400 Received: by mail-wm0-f41.google.com with SMTP id g17so44117536wme.1 for ; Fri, 29 Apr 2016 09:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=uhw6AbXrS9Q2vUCg0WjojMNSmdUnRbdMZDgCMXSklMc=; b=bN4/4/w6XrWq791SWfdmRyOTWvKzF42S7M3dRmOxj3OK38Oo7hEWeVtETXdZwCo4Dc +CymfdEJAU27Hv6hlF3Wu83OQVdRk4JIxbevsh4n3yqCYbE19mCXeyJB9OCgQ4brC0CN C47Uddjz8cGR0wuzx/RskpiW1nKaIZ1Qsq+4Wxe5aMSUegkzF69/wPaptpY7JKzHVuEt mp9WLtaPWBr1Jhp9t4b9hjct2+uSK0x0x4tMqEYR6n3bW/HmpTWfsYEXc+8QJGY+KVJi pn6DlKDyXO++eJionpmFkftMDe+NXvuX9gk6VIaZ0i/UTulSoPXLdfNeW+mGfqxzUGIe aY0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uhw6AbXrS9Q2vUCg0WjojMNSmdUnRbdMZDgCMXSklMc=; b=QH0gPKUNzs60ztzujV7GSO+DT4YW4H32xtxnh4DQkrAFNpXncERdDkxxer+CmnIluk M+5CL8LJ483FNhxgC4LmQx1qXbcLDjSLGfm8/NU7wOAeGBjfaps6cCLgPzgis7mOBTOn KSZHSyHqq6kw24sxGt5FzqsYpdU1QSdtzASUWjlvwpJWIKLqLRLrxM0ama4cx28HcgJj Auv3XsR3tZklzfgJyOfByDfIkt+gBRHEth3N87rDH9yX9O3Vl4DntKb2/1zEzYaH7x1X XgSFJ46v52L7kxjunabRfxOm/PMPhQjQh54JnxkKJRy03T3QMm+YszQvIoOPiBcxBgj/ Rc4Q== X-Gm-Message-State: AOPr4FUh75O0dGxnVMJHST5xg/RWdP85lkP5JU7WArxOVn5nFCxP87S+hwoPDS/GVuqUGQ== X-Received: by 10.28.52.75 with SMTP id b72mr5050978wma.98.1461946247359; Fri, 29 Apr 2016 09:10:47 -0700 (PDT) Received: from [192.168.0.82] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id jh2sm15446219wjb.39.2016.04.29.09.10.46 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Apr 2016 09:10:46 -0700 (PDT) To: PHP internals References: <57173859.4080501@rochette.cc> <013101d19ff8$596b6010$0c422030$@tutteli.ch> Message-ID: Date: Fri, 29 Apr 2016 17:08:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC:generics] From: rowan.collins@gmail.com (Rowan Collins) Dominic Grostate wrote on 29/04/2016 16:59: > > After reading your email again, I find myself agreeing. This is > because I don't consider List to be a subtype of List. > > LinkedList would be a subtype of List, but inheritance > doesn't really extend any further beyond that, for the reason you have > illustrated. > Precisely, the rules for variance of the type parameter are not the same as the rules for variance of the generic class List itself. The exact variance that you want is different in different situations, so the safest assumption the language can make is to make the type parameter invariant by default, and then possibly have a syntax for you to state that you want covariance or contravariance in specific situations. Regards, -- Rowan Collins [IMSoP]