Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   why should you use c++ in this project ? (http://www.go4expert.com/forums/cpp-project-t22141/)

docesam 19May2010 01:23

why should you use c++ in this project ?
 
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

shabbir 19May2010 08:29

Re: why should you use c++ in this project ?
 
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.

xpi0t0s 19May2010 12:31

Re: why should you use c++ in this project ?
 
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



All times are GMT +5.5. The time now is 07:08.