On Fri, Feb 06, 2009 at 06:25:31PM +0100, Abdelkader Belahcene wrote: > HI, > There are many and many programming languages (mainly : C,C++,java, > Shell, Perl, python, php). which learn and use, in which circonstances > use that language instead of the other. > > In many situations we can use anyone, but which is better.
If you are running on *NIX, the ability to at least read a sh script is very helpful. I haven't spent enough time figuring out the syntax of test (multiple [ with or without spaces); seems too arcane unless you do it every day. I use sh the way DOS uses .bat files. If its more complicated, I go to something else. I've done a lot in Python. I have a lot of python programs. The new version of python will change the print statement to a print function (among other language changes) which will mean porting old stuff to new. Yuck. If you want to do system programming on *NIX, you'll need C. Even if you use another language, you'll end up using C library functions (importing or whatever) so you'd at least want to understand the syntax examples in the man pages (manpages-dev). If you want to learn for a job, ask some employers. If you want to lean for your self, I'd suggest Ada. Ada can do simple stuff. Ada can do anything that any other language can do. Ada can do OO if you want. There are excellent books available free on-line (www.adahome.com, www.adaic.org, www.adapower.com). Contrary to popular belief, it was not designed by committee. It was chosen by committee after a competition. The US military wanted to reduce the thousands of different languages and dialects used in its software (for everything from mainframe to imbedded) and wanted a single lanugage that could do everything. The winning team started with Pascal (which itself was designed to teach good programming) and tightened it up, extended it, etc. They looked at all the different domains (usages) for the desired language and ensured that it would be efficient (for both the programmer and the machine) in all of them. Compiling is a one-step process. If your source code is in foo.adb $ adamake foo.adb gives you your executable, assuming that you didn't make any errors that would be caught at compile time. One of the design goals of Ada was that errors would get propogated to compile time to reduce the number of run-time errors, but also that logic errors would get propogated to run-time errors rather than have the program produce garbage. There are bindings (add-ons) for GUI, database (sql) interfacing, whatever. The compiler is part of gcc, known as gnat. I have a document (I likely got it from one of the web sites noted above, but I forget) caled "Understanding Programming Languages" by M. Ben-Ari <c> 2006 originally published by John Wiley & Sons. If you can't find it on-line, I could email it and the other docs I have (I could tarball it all up); just contact me off-list. Have fun. Doug. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org