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 <c...@l-i-e.com> 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
>
>

Reply via email to