why should you use c++ in this project ?

Discussion in 'C++' started by docesam, May 18, 2010.

  1. docesam

    docesam New Member

    Joined:
    Apr 10, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I read all over the web about how scripting programming languages (like ruby or python) are fast for writing programs quickly. so i would like you to consider a programming project that is :

    1- the length of source code is in the magnitude of few hundreds to few thousands lines of code.
    2- not a low level (driver / OS level) program.

    question : since developing my program in ruby or python will be much faster(i assume) what are the reason(s) why i should consider using c++ over ruby /python for such project ?

    sharing your practical experience will be greatly appreciated.

    thank you
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    389
    Trophy Points:
    83
    Too little knowledge to consider any comparision.

    If your project can be done in VB do it in that as well because you would hardly need any coding.
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Do you actually know Ruby and/or Python? If not then it's unlikely to be quicker to use those than a language you already know.

    Personally I find writing C++ programs just as quick as any other language I've ever used. You actually spend the bulk of the time writing application logic, calling low-level functions, within mid to higher level functions that are application specific and that no compiler, script etc will ever include in their standard libraries. At that level of programming the *only* difference between different languages is syntactical:
    Code:
    doMyFancyFunc(); // c++
    PERFORM DOMYFANCYFUNC. // COBOL
    GOSUB DOMYFANCYFUNC; rem BASIC
    call _domyfancyfunc -- assembler
    begin myFancyFunc; end; -- PL/SQL
    ...etc
    
    If you're writing something fairly small where the bulk of time is spent writing the lowest level functions which are included in language A but not language B, and you know both A and B, then using A will be faster than B because those routines are already developed and debugged. But this will be a very simple program.

    When learning a language, by definition you spend loads of time in the standard libraries and it's easy to fall into the misconception that that's what application programming is all about. It isn't; when you get past the learning, you're back to a small amount of time hitting the low level functions and a lot of time sorting out and debugging the application logic itself. The size of programs you've given indicates you're not talking about a "hello world" test program where BASIC is just as good as anything else:
    Code:
    10 print "hello world"
    20 end
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice