Ben, I think you hit on one of the key points of PHP in the latter part of
your email.  My take is that PHP is designed to be quick to learn, quick to
use, and somewhat simple (not in a bad way).  I agree that as compared to
most languages, more than usual is packed into the base system.  But, given
the speed of PHP, and that these are likely heavily used pieces anyway, it
doesn't seem so bad.

I think once you step away from what's in the base PHP distro, then PHP is
nearly as modular as anything else.  As Oliver mentioned, you can use
classes nicely (not as good as Java or Python, but not bad), and you can
obviously split your code up into many files, include what you need, etc.

I'm not clear on the comments about an include bringing in everything even
if it's in an if that evaluates to false.  Java is no better in this case
really, and neither is C++ or various others.  Also, PHP actually does have
a way of only including something in a section of code that gets run (i.e.
it's included at runtime, not parse time).  This is the difference between
include_once() and require_once().  So, if you only want something included
if some expression evaluates to true, just stick an include_once() inside
that expression's scope.  If I misunderstood your comments about this, my
apologies, and maybe you can elaborate here.

-----Original Message-----
From: Oliver Ruf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 04, 2001 8:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP is a Bloated Kludge, discuss!


Well about beeing modular...
Have you ever programmed java ?? Java is very modular and everyting in java
is programmed with classes.

So... PHP also suports classes. Now you should be able to build your own
modularity as you like it...

Enough said...
-Oliver


[EMAIL PROTECTED] (Ben Edwards) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

> (From behind filing cabinet where I am ducking preparing for flames).
>
> Is it just me or is there anyone else that thinks PHP suffers from not
> being modular.  Let me explain myself.  If you write a module for a lot
> of procedural languages it sits on the filling system and is called up
> when it is needed , loaded into memory and executed. There maybe some
> cashing which happens but this is basically how it works.
>
> PHP on the other hand seems to load in ALL the code that MAY be run.
> i.e. an include brings things in which are inside an if,  even if the
> if equates to false.
>
> This means that the language is not extendible in the way others are.
> If you do write a function you wish to include in 'only the pages you
> wish to use'  you have to first include it, then call it.
>
> This has also meant that things like spell checking functions are built
> into the core module rather than called in as or when they are needed.
>
> Then there is the way database connectivity is handled.
>
> There are a load of functions (again in the core language) with there
> NAMES containing the name of the database you are connecting to.
>
> For example all MySQL functions are mysql_something and I guess all
> oracle ones are oracle_something.  This would only be a minor
> inconvenience because wrapper functions can be written but from what I
> can gather different databases have different functionality available.
>
> I know this is partly because different databases have different
> functionality.  what I would expect to see is a load of generic
> function which attempt to provide same functionality where it is
> available or implement some of the functionality themselves.  Obviously
> for some of the less sophisticated databases these functions would have
> to do more work and maybe some functionality wouldn't be available in
> certain databases (but only the things like stored procedures).
>
> Got a nast feeling that ASP (spit) does something like this.
>
> You may cry, it cant be done.  however I remember a connectivity
> product that came from Borland (this was back in the Paradox Days)
> which did just this, it even had transaction handling built into this
> connectivity layer for DBase!
>
> Anyway I am playing Devils Advocate.
>
> What I do like about PHP is how quickly it can be learnt and how quick
> you can build apps with it.  Maybe this is at the expense of elegance.
> Maybe PHP5 will address these issues -;)
>
> And there are certainly some very busy PHP sites, you should see the
> traffic levels on indymedia.org during anti-capitalist demonstrations
> and I am sure during the New York attacks they went belistic.
>
> Regards,
> Ben
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to