Re: Scalar type hinting

From: Date: Tue, 28 Feb 2012 22:48:18 +0000
Subject: Re: Scalar type hinting
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-58297@lists.php.net to get a copy of this message
I don't think the strong/weak stuff is necessary at all. Either a programmer cares about datatype or they don't and the vast, vast majority won't. Declaring a variable's datatype should have the effect of locking that variable's datatype down and not allowing it to switch types with the sole exception of NULL. Trying to declare a degree of strength to the typing is severe overkill. I recognize that I suggested this in my first proposal, but at this point I'm opposed to it. On Tue, Feb 28, 2012 at 5:39 PM, Kris Craig <kris.craig@gmail.com> wrote: > I think that's a bit of a stretch, to say the least.  The same argument > could be made that PHP 5's introduction of stronger OO implementation would > have scared this person away.  The fact is, we don't know that either of > them would have.  For one thing, I doubt he monitored the PHP Internals > list; if he had, that in and of itself would have been enough to scare him > away lol.  If strict typing was the norm, then yeah it probably would have > scared him off.  But adding optional typing, which is what we've been > discussing here?  I seriously doubt it. > > --Kris > > > On Tue, Feb 28, 2012 at 2:26 PM, Richard Lynch <ceo@l-i-e.com> wrote: > >> On Tue, February 28, 2012 3:31 am, Arvids Godjuks wrote: >> > I really liked what the O'Raily wrote here: >> > >> >> http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html >> >> Please note that the author was a bass player in a band wanting to >> sell CDs online when the five (5) choices were the same >> brick-and-mortar major label distributors who wouldn't take his CD as >> he wasn't on a major label. >> >> He examined the options, and PHP was the only one that didn't make his >> head spin. >> >> His act of creating a single page to sell his CD online went viral, >> and he accidentally built a multi-million dollar company because of >> that. >> >> Since he'd never set out to make the money, just to help his friends >> (and they told 2 friends, and they told 2 friends...) he always >> tracked success not by not, nor gross, but by dollars paid out to >> artists[1] >> >> He eventually sold the company to a trust fund that goes to charity >> when he dies, and lives very comfortably off the interest, since he >> lost interest in running the company when it just got too routine.[2] >> >> If he had seen this strict/weak/strong stuff in PHP, that online CD >> store for the indie artists would probably not have existed for quite >> a long time, if ever. >> >> He's actually been online a long time, and is worth learning from, >> even if he never actually became a Real Programmer (tm), in his own >> words. >> >> PS >> You can find many conversations between him and me on the old, old, >> old PHP list before the split of the lists into -general etc. >> >> [1] http://www.cdbaby.com/About >> [2] http://sivers.org/trust >> >> -- >> 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 >> >>

« previous php.internals (#58297) next »