Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58038 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61397 invoked from network); 24 Feb 2012 22:33:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2012 22:33:09 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:37070] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/CF-17132-320184F4 for ; Fri, 24 Feb 2012 17:33:08 -0500 Received: by wgbdq12 with SMTP id dq12so2366842wgb.11 for ; Fri, 24 Feb 2012 14:33:04 -0800 (PST) Received-SPF: pass (google.com: domain of kris.craig@gmail.com designates 10.180.99.100 as permitted sender) client-ip=10.180.99.100; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kris.craig@gmail.com designates 10.180.99.100 as permitted sender) smtp.mail=kris.craig@gmail.com; dkim=pass header.i=kris.craig@gmail.com Received: from mr.google.com ([10.180.99.100]) by 10.180.99.100 with SMTP id ep4mr8921470wib.7.1330122784973 (num_hops = 1); Fri, 24 Feb 2012 14:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=u56782yZ4LHDbannrI8JEBAbXXESpgn5w1yZN1q7UQE=; b=vh3xF30C/l9+RNDJ41C18H0h2eMlqKrJfmoFr4XswSd30n1dB158a64EwhDD47wY42 3yeFlUnOgIkucKecfrdXWn51kFLXuYudsnWIsAm8p46fkgO1UtFfHwft+tmcq56RBGoq HrB1GbXT4JX4vZSD4cTtfE0HNdn7bUvlY4MPk= MIME-Version: 1.0 Received: by 10.180.99.100 with SMTP id ep4mr7184713wib.7.1330122784918; Fri, 24 Feb 2012 14:33:04 -0800 (PST) Received: by 10.223.75.146 with HTTP; Fri, 24 Feb 2012 14:33:04 -0800 (PST) In-Reply-To: References: <4F455C96.50706@gmail.com> <4F455E91.2060408@alliantinternet.com> <028001ccf1ab$0b200050$216000f0$@alliantinternet.com> <4F457517.7050901@alliantinternet.com> <028d01ccf230$91d79b00$b586d100$@alliantinternet.com> <4F4686C6.2040207@sugarcrm.com> Date: Fri, 24 Feb 2012 14:33:04 -0800 Message-ID: To: Richard Lynch Cc: PHP internals list Content-Type: multipart/alternative; boundary=f46d04428e5c1a4b9304b9bd5890 Subject: Re: [PHP-DEV] [RFC] Enum proposal (yet another) From: kris.craig@gmail.com (Kris Craig) --f46d04428e5c1a4b9304b9bd5890 Content-Type: text/plain; charset=ISO-8859-1 Woops that was a typo lol. I meant to put "and a" between the two. I hear that a lot; i.e. "If you want static typing, use Java." Unfortunately, that dismissive answer has not worked too well over the years, has it? People are still clamoring for this, and I think making some very valid arguments that shouldn't be so derisively and flippantly brushed aside. Besides, I don't see any rule listed anywhere that says PHP has to be a pure dynamically-typed language. People have made some very viable arguments as to why this would be beneficial. Your "but PHP doesn't currently do this so screw it" rebuttal really doesn't add anything to the discussion, IMHO. I'm not being rude or abusive: If anyone thinks PHP is carved in stone and can never be changed or evolved, they just shouldn't work on developing it. ;P So no, sorry, but I don't think that's a valid argument. Your other arguments do have merit, and some alternatives have already been floated to address them. But the whole, "If you don't like it then just get the hell out and use Java instead," attitude carries ZERO weight with me. =) --Kris On Fri, Feb 24, 2012 at 2:11 PM, Richard Lynch wrote: > On Thu, February 23, 2012 1:21 pm, Kris Craig wrote: > > 1. Is strict typing something that we should seriously consider > > implementing at some point in the foreseeable future? > > No. > > If you want that, PHP is not the language for you, so just go use Java > and JSP. > > I'm not being rude nor abusive: If anyone dislikes the way PHP works > at such a fundamental layer, they just shouldn't use it. > > > 3. If toggleable, should this be defined at the config level, the > > script > > level, or both? > > God no. > > The insanity of dozens upon dozens of php.ini settings make > portability difficult enough already. > > > of "sending" variables (JSON-encoded/decoded from a remote > > hub that he also > > wrote) with inconsistent types. For example, the "progress" > > key could be a > > multidimensional array, a string, NULL, a boolean, and in one > > rare case > > even an object pointer. But MOST of the time, it's an array, > > switch (true){ > case is_array($input): break; > case is_null($input): break; > case is_boolean($input): break; > case is_string($input): break; > default: > //There is no object pointer in PHP, so I dunno what you are > talking about... > break; > } > > Was that really that tricky? > > > - It would probably be a fairly large undertaking to implement. > > Monstrously large. > But feel free to try it yourself. :-) > > -- > brain cancer update: > http://richardlynch.blogspot.com/search/label/brain%20tumor > Donate: > > https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --f46d04428e5c1a4b9304b9bd5890--