List:General Discussion« Previous MessageNext Message »
From:Michael Farr Date:April 29 1999 2:55pm
Subject:Re: Need an opinion - C vs PHP
View as plain text  
At 10:26 AM 4/29/99 -0400, you wrote:
>Michael Farr wrote:
>>   It is quite simple to generate your own GIF image's dynamically (with
PHP), 
>
>You can do this in C with the gd library from Thomas Boutell.
>
>	http://www.boutell.com/gd/
>
>
>> C is good ... but not for web pages.
>
>Why not?  I am truely interested in your opinion in this.  I've heard
>other people say the same thing, but so far it's been mostly a lack of
>experience in C and greater experience in some other language.  I don't
>do much in Perl, but that's not because Perl is not a good language,
>it's because I'm not as experienced with it.
>
>I have been using it for web apps for 4 1/2 years.  Certainly writing
>everything from scratch in C would be a pain in the rear, but that's
>what libraries are for.

Don't get me wrong, C is good, but the power of C is really used when all
you ever want to generate is stdout text.  If I needed to do some real
tough processing, then I'd use C, or C++.

Mostly scripting doesnt need much more than a print statements, PHP is more
direct at this.  For example
In php you can say
echo "<INPUT TYPE=HIDDEN NAME=servname VALUE=$servname>";
in C you would say
printf("<INPUT TYPE=HIDDEN NAME=servname VALUE=%s", servname);
or C++
outs << "<INPUT TYPE=HIDDEN NAME=servname"VALUE=" << servname; 

Its a pain having to think about joining the strings properly in C.  I
prefer to just write it the way it is going to look.

Also the libraries are there and are easy to look up when you need to do
something more interesting.  C doesnt have cool web sites like PHP to go
and ask questions about creating web pages on.  

On the other hand when you want to get really hard core, you can do some
stuff like they have got on the php web page ... I still haven't figured
that stuff out.

.. the difference is so minimal its not funny, but overall PHP has got to
win for web based stuff

Thread
Need an opinion - C vs PHPas2k.com29 Apr
  • Re: Need an opinion - C vs PHPpete collins29 Apr
    • Re: Need an opinion - C vs PHPWayne Lovely29 Apr
  • Re: Need an opinion - C vs PHPWayne Cease29 Apr
  • Re: Need an opinion - C vs PHPMartin B. Jespersen29 Apr
Re: Need an opinion - C vs PHPGraeme B. Davis29 Apr
  • Re: Need an opinion - C vs PHPMichael Farr29 Apr
    • Re: Need an opinion - C vs PHPkalle volkov29 Apr
      • Re: Need an opinion - C vs PHPRichard McLean30 Apr
  • Re: Need an opinion - C vs PHPErik Liljencrantz29 Apr
    • Re: Need an opinion - C vs PHPUnknown Sender29 Apr
RE: Need an opinion - C vs PHPTapan Raj29 Apr
Re: Need an opinion - C vs PHPMichael Farr29 Apr
  • Re: Need an opinion - C vs PHPEd Carp29 Apr
    • Re: Need an opinion - C vs PHPEduardo Arino de la Rubia29 Apr
    • Re: Need an opinion - C vs PHPjohan.engstrom30 Apr
    • Re: Need an opinion - C vs PHPJay Flaherty30 Apr
    • Re: Need an opinion - C vs PHPRobin Bowes30 Apr
Re: Need an opinion - C vs PHPGraeme B. Davis29 Apr
  • Re: Need an opinion - C vs PHPBengt Hahn29 Apr
Re: Need an opinion - C vs PHPGraeme B. Davis29 Apr
  • opinion C vs PHP and othersBengt Hahn1 May
RE: Need an opinion - C vs PHPRichard Rossi30 Apr