Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42350 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23661 invoked from network); 19 Dec 2008 14:50:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2008 14:50:44 -0000 Authentication-Results: pb1.pair.com header.from=surreal.w00t@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=surreal.w00t@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: surreal.w00t@gmail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:42520] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/07-09584-3C4BB494 for ; Fri, 19 Dec 2008 09:50:43 -0500 Received: by fg-out-1718.google.com with SMTP id 16so380030fgg.23 for ; Fri, 19 Dec 2008 06:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=UCKMR+gBbzR9pIIIc71WPlmTF9THESBodJ6QB474kCo=; b=HTXkXFjSrLzBriYb/WMthTlxfVbhlBbXZMLYguWcBwfeuzlLhWJMfhkzD+7wccPWX1 YGQbgdjsdQDsSvuuPcGozMWmUb4Pmk5NR0BMRty/YF2ilswo1CuP3TCQoPfLggLJDavZ APF7gLyCNCfIFd9mdJH9WRXtw9BC4Jy7EuBLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=EncU5FjNuYjJo+3pP+lZNwUvOBC0uHoRZmz16BaLsMSx2LPzv3B4V5cSSSFWeILRoW LsYjm9sMl44ErmC63TpvxDk6DTCPKuh4ELQyxQcPWUXdP6Bx7+PMthg6EhTed06iWXqT JkbiSshY142q9rNB88Rnf3/+reF7lZGN51FkU= Received: by 10.86.76.16 with SMTP id y16mr1868248fga.17.1229698240568; Fri, 19 Dec 2008 06:50:40 -0800 (PST) Received: by 10.86.87.15 with HTTP; Fri, 19 Dec 2008 06:50:40 -0800 (PST) Message-ID: Date: Fri, 19 Dec 2008 14:50:40 +0000 Reply-To: viroteck@viroteck.net Sender: surreal.w00t@gmail.com To: "troels knak-nielsen" Cc: "PHP Developers Mailing List" In-Reply-To: <98b8086f0812190640l6a2dd6bcm179031e36a50a122@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <69.22.48223.7E389494@pb1.pair.com> <494A3B12.80509@dmi.me.uk> <494ABFD8.2090406@suse.de> <494ACAA8.6080600@dmi.me.uk> <494ACEAE.2090700@gmail.com> <494AD2AF.9000702@gmail.com> <2dedb8a0812181823q53a3b464oc1e2e2bd37792f98@mail.gmail.com> <494BB04C.40603@gmail.com> <98b8086f0812190640l6a2dd6bcm179031e36a50a122@mail.gmail.com> X-Google-Sender-Auth: 9146dfc09413e287 Subject: Re: [PHP-DEV] Q on Primitives From: viroteck@viroteck.net ("Robin Burchell") On Fri, Dec 19, 2008 at 2:40 PM, troels knak-nielsen wrote: > PHP is loosely typed. Adding typehints to primitives would change > this. The only reason that it is working with object types, is because > you can't automatically coerce object types anyway. > > -- > troels I'm not sure what you are getting at here, really: the suggested functionality is optional, and a new addition mean that it indeed will not have an effect on backwards compatibility. What was the purpose of your mail? I cannot furthermore see why providing the choice for people to strong-type when it suits their purposes as well as allowing weak typing when useful is such a bad thing. Indeed, I'd quite love for this mixture :) I agree that typing *can* be accomplished in other ways, e.g. instanceof and various other hacks, but they are then not enforcing it in a uniform and controlled manner as type hinting does, plus they are less elegant than providing it as an optional first class language feature.