Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37309 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40439 invoked from network); 29 Apr 2008 16:29:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 16:29:39 -0000 Authentication-Results: pb1.pair.com header.from=johncart@cisco.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=johncart@cisco.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cisco.com designates 171.71.176.70 as permitted sender) X-PHP-List-Original-Sender: johncart@cisco.com X-Host-Fingerprint: 171.71.176.70 sj-iport-1.cisco.com Received: from [171.71.176.70] ([171.71.176.70:38797] helo=sj-iport-1.cisco.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/69-26601-0FC47184 for ; Tue, 29 Apr 2008 12:29:39 -0400 Received: from ams-dkim-1.cisco.com ([144.254.224.138]) by sj-iport-1.cisco.com with ESMTP; 29 Apr 2008 09:29:30 -0700 Received: from ams-core-1.cisco.com (ams-core-1.cisco.com [144.254.224.150]) by ams-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id m3TGTTMl000460 for ; Tue, 29 Apr 2008 18:29:29 +0200 Received: from xbh-ams-332.emea.cisco.com (xbh-ams-332.cisco.com [144.254.231.87]) by ams-core-1.cisco.com (8.13.8/8.13.8) with ESMTP id m3TGTTtC026863 for ; Tue, 29 Apr 2008 16:29:29 GMT Received: from xmb-ams-33e.emea.cisco.com ([144.254.231.75]) by xbh-ams-332.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 Apr 2008 18:29:29 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8AA16.3289E6DA" Date: Tue, 29 Apr 2008 18:28:59 +0200 Message-ID: In-Reply-To: <7dd2dc0b0804290914k7f9ac686ic11074876ca1acca@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: [PHP-DEV] Class Properties in Interfaces? Thread-Index: AciqFCmhTVBLARvqQrepEza5rmqBRwAALj2g References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> <7dd2dc0b0804290817v3d8de030y1208a88f78c44411@mail.gmail.com> <7dd2dc0b0804290914k7f9ac686ic11074876ca1acca@mail.gmail.com> To: X-OriginalArrivalTime: 29 Apr 2008 16:29:29.0449 (UTC) FILETIME=[3291FD90:01C8AA16] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=6532; t=1209486569; x=1210350569; c=relaxed/simple; s=amsdkim1002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=johncart@cisco.com; z=From:=20=22John=20Carter=20-X=20(johncart=20-=20PolicyApp= 20Ltd=20at=20Cisco)=22=20 |Subject:=20RE=3A=20Re=3A=20[PHP-DEV]=20Class=20Properties= 20in=20Interfaces? |Sender:=20; bh=4K4bSHmzQHaNFCOXD0/+zOkKlVLhBsI0t6agf3Vbyjo=; b=mR6nXTDYZzk6HbVwC0cohhaCN7V4m+BmFn6BfauydjakieAruAw+jPdaoy yUsW0hqJWjz+UJor2FFJtpHNO26WLUMV6nCg+J/PZx8c3eapDgtGidlsNd4J qPPF7Et/rc; Authentication-Results: ams-dkim-1; header.From=johncart@cisco.com; dkim=pass ( sig from cisco.com/amsdkim1002 verified; ); Subject: RE: Re: [PHP-DEV] Class Properties in Interfaces? From: johncart@cisco.com ("John Carter -X (johncart - PolicyApp Ltd at Cisco)") ------_=_NextPart_001_01C8AA16.3289E6DA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Nathan, =20 By example: =20 interface EggLayer =20 { public $eggsLaid; } =20 class Chicken implements EggLayer; =20 Some would say (and maybe I would too) that you should have a getEggsLaid() method, that's fair enough. But why not the above? =20 You say interfaces can't have properties because they require instance variables. Why do they require instance variables? I also think for the purposes of this discussion, property and instance variable mean the same thing. =20 John. ________________________________ From: Nathan Nobbe [mailto:quickshiftin@gmail.com]=20 Sent: 29 April 2008 17:14 To: John Carter -X (johncart - PolicyApp Ltd at Cisco) Cc: internals@lists.php.net Subject: Re: Re: [PHP-DEV] Class Properties in Interfaces? On Tue, Apr 29, 2008 at 9:51 AM, John Carter -X (johncart - PolicyApp Ltd at Cisco) wrote: The article explicitly mentions OOP interfaces in a few languages. my bad. =20 But the article, or for that matter any formal definition of an interface isn't really what I asked about: =09 My question was simply: why can't interfaces have properties? when you say properties, do you mean a particular set of methods map to a particular instance variable, as getters and setters (i saw that definition from Sebastian earlier)? if thats the case than interfaces cant have properties because they require instance variables. -nathan ------_=_NextPart_001_01C8AA16.3289E6DA--