Neophyte Question ...

This is a discussion on Neophyte Question ... within the C++ Programming forums, part of the General Programming Boards category; Good Day All, Here's what I assume to be an easy question, Why would one choose to program cgi-bin programs ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Location
    Ottawa
    Posts
    18

    Neophyte Question ...

    Good Day All,
    Here's what I assume to be an easy question,

    Why would one choose to program cgi-bin programs in say Perl, PHP or Python when the same things (... I think) can be accomplished in C++?

    Regards

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    turn the question around -- why do it in c++ when you can do it in Pearl, PHP, or Phthon? Each language has its advantages/disadvantages. If you know all those languages then use which ever is easiest to implement the requirement. Some things (ok maybe a lot of things) are easier to implement in one language then another.

  3. #3
    Bond sunnypalsingh's Avatar
    Join Date
    Oct 2005
    Posts
    162
    CGI scripts can be written in any programming or scripting language that allows it to be executed on your system, such as C, C++, Visual Basic, UNIX shell, Perl, and so on. If you use a programming language such as C/C++, to create your program, you will have to compile it before you can run it. Many people prefer to write CGI scripts, using a scripting language like Perl, instead of programs, since they are usaully easier to debug, modify and maintain than a compiled program.

  4. #4
    Registered User
    Join Date
    Oct 2005
    Location
    Ottawa
    Posts
    18
    Thanks for the replies,
    If one were creating code or scripts to be executed on an older and slower server, would a compiled program run quicker than an interpreted program?

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Yes, but if your server is that old then you need to upgrade it to the 21st century, assuming you have that option.
    Last edited by Ancient Dragon; 11-04-2005 at 10:50 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21