You are here: Re: Will php ever do strong typing? « PHP Programming Language « IT news, forums, messages
Re: Will php ever do strong typing?

Posted by Data Goob on 05/27/05 04:37

dterrors@hotmail.com wrote:
> Will php 6 do strong typing and/or namespaces?
>
> I was shocked to find out today that there are some people who actually
> argue that weak typing is somehow better. I didn't even know there was
> a debate. Shocking. That's like arguing that square tires are better
> than round.
>
> Anyway if anyone knows that php is going to intentionally stay weak in
> the future let me know so I can jump ship, thanks,
>
> mrb
>
PHP was developed for the web, which assumes "everything is a string", whereas,
C assumes "everything is an int". Perl was adapted to the web, PHP was built
for the web from the ground up. Perl and PHP certainly depend on C or C++ but
the whole point is that you don't have to master C to program with PHP or Perl,
instead you master the art of programming these languages for the most part
using strings, not ints.

C is a great language to build a language like PHP, but C or C++ will never be
the right language for the web, simply because it requires a programmer to think
too much about the program guts and not about the behavior of the program. Most
C programmers that are in love with the glow of C-programming don't get how difficult
it really is to develop applications with it--especially how ridiculous to think you
want to develop web applications with a compiled language--too retarded to even go
there... The web is about strings, not about ints. And C with all of its defines,
voids, and other arcaneness, is this what I really want to spend time on?

PHP allows people to be successful quickly with C-like programming, without having to
deal with the arcane inconsistencies of C, but get the added benefit of associative
arrays. This is so amazing, you need to write C to appreciate PHP. PHP is also more
successful than Java because it doesn't require a lot of abstraction or object programming,
unless you really want it.

Step back and look at Java or C, and all the things you must do to be successful. To be
sure, Java and C have their place, but PHP is more appropriate to building web applications
simply because you can focus on the art of building an application and not whether or not
you got your pointers right, or types correct. Save that for the low-level building of libs
and toolkits and languages.

PHP succeeds because it allows the best of both worlds, the world of drop-through
programming or object programming, no compiler, simple, intuitive logic constructs,
and associative arrays, they are simply awesome. What a great language in PHP. It
appeals to my laziness.

Perl ain't bad either, hashes are fantastic, and save me from having to write
arcane C code to build difficult-to-read linked-lists, geezus what pain to read
and follow compared to simple hashes and hashes-of-hashes in Perl. Imagine the
effort required to write a C or C++ program with hashes-of-hashes. It would be
so unenjoyable and unproductive as to make me want to take up another career.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация