Re: Strict types



Steve Chapel wrote:
Treefrog wrote:
Hi All,

For a while now I've been wishing PHP had (at least the option to
enable) strict types. It would help a massive amount in BIG
applications, and maybe start to taper the millions of lines of crap
code that's out there.

Generally speaking, PHP is a scripting language. Scripting languages are
great for one-off projects and small programs, but become unwieldy in
big applications, larger than a few thousand lines. For larger projects,
I would suggest Java, which has strict typing and encourages
object-oriented programming and modularization.

No no, I can already code c# (so probably Java too), that has strict
types and great oo support, but I've grown up using PHP, all my
professional career has been mainly PHP based and I want to stay with
the language. I've seen it evolve to inlcude basic OO support, then
more advanced OO....

Once upon a time, PHP was a scriting language, but it's more than that
now. For example, I'm currently working with a 500,000 line 100% PHP
application. Because 95% of it is built on poor coding, it's nearly
impossible, certainly futile to try to impliment standards into it. I
was just trying to think of/ask for ways in which situations like this
can be stopped in the future. Which, I think needs to happen for PHP's
future. I've worked in quite a few places, and with quite a few other
developers, and they seem to agree; PHP code is nearly always messy
crap.

But it doesn't have to be.

.



Relevant Pages

  • Re: Strict types
    ... enable) strict types. ... PHP is a great language, but the masses of incompetant coders out there ... one of the big attractions to PHP is the lack of strict typing. ...
    (comp.lang.php)
  • exporting Environment variables from mod_perl
    ... Normally the environment will propagate to processes called via ... use strict; ... open T, "php test.php|"; ... The PHP script you attempted to run was not found on this server. ...
    (comp.lang.perl.modules)
  • "use strict"?
    ... Is there anything in PHP like the "use strict" of Perl which requires ... misspellings in variable names. ...
    (alt.php)
  • Re: equivalent to use strict in php?
    ... >is there any equivalent of perl's use strict; ... because PHP doesn't have lexically scoped variables in the same was as ... Perl, nor does it have any way of defining variables other than through the ...
    (comp.lang.php)
  • Re: Newbie Looking for a Language
    ... But if you ask for advise on a PHP newsgroup isn't the answer a foregone ... Python, Perl, Ruby, and Lisp discussed. ... I think the term 'scripting language' is rather deprecated by the developers ...
    (comp.lang.php)