Is it worth to learn Ada instead of another languages [c++, c#]?
If your teacher and most of your fellow students use Ada, it is probably best to go with Ada. It is a very good language, both for small and large scale programs. It is very readable and it protects you (to some degree) against a lot of common mistakes.
Ada is for software engineering. As darkestkhan said, it is not a "hack and hope for the best" language.
The advice of Paul Stansifer is very good: Learn several languages. Make sure you have a plenty of tools at your disposal - don't limit yourself to just one language. The perspective you gain from learning different languages is very valuable. There's definitely more than one way to skin a cat - take a look at Haskell for example. You'll gain a whole new perspective on how to solve problems.
Language syntax is the least of learning how to program. The hard part is learning how to model complex real world problems into something that makes sense in the very limited scope of a programming language. With its strong type system, tasking model, generics and solid tools for real-time and concurrent programming Ada is ideally suited to this job.
Since you're asking specifically about robotics, a good book to get might be "Building Parallel, Embedded, and Real-Time Applications with Ada" by John W. McCormick, Frank Singhoff and Jerome Hugues. It's a very good read.
http://www.cambridge.org/gb/knowledge/isbn/item5659578/?site_locale=en_GB
Yes. Very much so, in my opinion.
Ada is very good in two points that are often overlooked in other programming languages:
- The generic system: packages, functions, and procedures can all be generic. This works together particularly well for ingraining the DRY [
Don't Repeat Yourself
] principle. Yes, you can go overboard on generics, but the thing I've seen in (other language) projects was that cut-and-paste programming seems to be more common. [and that just introduces multiple points-of-failure if a bug needs fixed on that spot of code.] - Native multitasking. One of the great things about a language-level tasking feature is that multithreading doesn't feel 'tacked on' and isn't an unwieldy extension but integrated into the language.
That said, there's other good reasons to learn/use Ada. One is the picky compiler, by being so picky it forces you to start to think in ways that naturally reduce programming errors. (Like the prohibition on and
and or
in the same conditional.)
Another is the concept of subtypes; subtypes are the opposite from objects in OOP, instead of branching out the further derevitions you go, you narrow the type (it's acceptable values) the more you get away from the base type. {Think of it in terms of proper sets; Integer is your base type, Natural are your non-negative Integers, and Positive are your positive-integers... and with Ada 2012, you can have interesting exclusions on your subtypes, say Primes which are subtypes of Positives (sorry for being a bit vague on that last point; I'm still learning the 2012 stuff).}
With Ada 2012, you can also have pre- and post-conditions on your subprograms; this alone can make your libraries more stable. (As can null-excluding pointers.)
Peter Norvig's advice is probably relevant here:
When asked "what operating system should I use, Windows, Unix, or Mac?", my answer is usually: "use whatever your friends use." The advantage you get from learning from your friends will offset any intrinsic difference between OS, or between programming languages.
Teach Yourself Programming in Ten Years
The whole essay is a good read.
Incidentally, Ada was the first language that I learned. Learning Ada first had one major advantage: no one uses Ada, so I was forced to learn another language before doing anything else, and thereby gain perspective. One of the worst problems that beginning programmers can have is the belief that the way things are done in their first language is just The Way Things Are Done. Learning a new language is easy and immensely valuable.