I know the answer to this question depends on exactly what I want to learn but I need suggestions. I teach Algorithms and Programming lesson to first-year software engineering students. I teach C programming language.
I agree with C#. In the past, the answer would be Pascal, but C# is modern, object oriented and even suited with some Pascal features (e.g. you can directly assign the value of string variable, without C/C++ strcpy), thanks to its author Anders Hejlsberg.
For algorithms implying customized data structures (like colored trees, graphs), I would suggest C++ as it's easy to handle structures, to build different .h/.cpp files for different structures, so it forces to structure the code in different modules.
Additionally, if you want your students to create simple API/interfaces, the combination C++/Qt works very well and is easy to handle by beginners,
I personally learnt algorithmics on CaML, which is typed, but avoids pointers, so it's easy to program complicated algorithms without risk of seg faults, but the interface is poor ...
If the students are from another field than computer-related sciences, (such as biologists), I would advise python, as the syntax is very easy to handle for beginners without having to understand too much about memory/programming. The weak point of python, to me, is it allows too many weird manipluation and is not typed, so when errors occur during execution, it's just a pain to find where the error comes from.
Finally, I personally dislike java because it's over-using classes, and you have the impression that you never write any code, but rather call a method of a subclass of a subclass of a class all the time, which means it requires a lot of conceptual thinking which is not important, I think, to learn algorithms.
i suggest Racket; it's a good environment plus you can teach functional data structures and algorithms too in a neat manner(it's really hard for most people to think in a functional style after they've been taught only in an imperative fashion of reasoning about algorithms and data structures i suppose); Python and Java are good candidates too(they've got tonnes of libraries and ready to go codes); nonetheless choice of (first) programing language for anything is a tough one to make;
Pascal was the teaching language of choice, Mainly because it enforced a strict structure. I remember way back when we used psuedo code for working out Algorithms. Once that's done it can be easily transposed to a language be it Object based or not . Depends on the purpose of the lessons to get people to think in a structured way or to write programs . Showing my age now
Perhaps C/C++. As Alberto mentions above, most procedural programming languages are based on C++ and once you know C++ you can quickly switch to Java, C#, JavaScript, PHP, etc. The advantage of C++ is that you can both learn to program at low level and write short/compact code. While students should be encouraged to use libraries, I personally believe that they would be more versatile programmers if they can code algorithms without relying on too many libraries.
I think MATLAB may be a best choice. It has ready-made functions and can make you easily implement the algorithms without typing many lines of codes.Implementing algorithms in MATLAB is much easier, and MATLAB lets you prototyping your algorithm much faster. In moving to the industry, then students can later implement the algorithms in other high-level programming languages like C# or C++. MATLAB is well suited for researchers and students, who always need to quickly prototype their algorithms before implementing them into real hardware (using C, C#, or C++).
I think C++ gives more easy approach for developing algorithms as it provides various data structures needed for algorithm development. and also provide procedural as well as OOP approach.
You could use R, which is a free software programming language and software environment for statistical computing and graphics. However, for prototyping I think Python is better. Also since Python free I prefer it over MATLAB.
Check out SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering, http://www.scipy.org
If you use the Anaconda installation of Python you get a very good numerical computing environment, with graphics and graph plotting.
I agree with Alberto. The students will benefit from learning C/C++ early on.
I come from an electrical engineering background and focused on digital image processing as a grad student. MATLAB was the tool of choice and learning high-level programming languages or programming concepts was not part of the curriculum. Even though I learnt C as a freshman, it was rudimentary.
Over the past few years, I have realized that I could really have used a better knowledge of programming since most of my work now involves image processing work in C/C++ (although, I still use MATLAB for algorithmic research and prototyping). There have been many times that I have had to spend time going through basic programming concepts before implementing some functionality, and there is still so much to learn that I sometimes wish I started off as a computer science student.
So, yeah, as Alberto pointed out, by learning C/C++, the students will be learning not just a programming language but also important programming concepts which will stand them in good stead even if they decide to switch to a different programming language down the line.