There's no such thing as "the best" or "the most powerful" language. Everytime such a question is posed, everybody is busy praising their favourite language.
If you want to do a serious choice of a language, you need to look at several dimensions:
1. Who is your target group - programming novices or seasoned programming veterans?
2. Is widespread acceptence in industry / government / academia important?
3. Do you need any modules or 3rd party libraries for your task?
4. What do you want to develop? For a simple system, a "quick and dirty" language such as Perl might be OK, but if you want to develop a complex system, your choice might be totally different
5. Do you have hardware restrictions? For an embedded system, C might be a better choice as Perl, for example.
6. Are there any political or legacy restrictions in your area, such as government or corporate standards? Overcoming those could be a lot of effort.
So, in short:
1. Set up your criteria list
2. Weight your factors
3. Measure the candidate languages according to your criteria
If you're in a political environment, two additional steps may be necessary:
4. If you're unhappy with the result, repeat from step #2 with more favourable weights
5. Go to your boss with your favourite language and tell him it was chosen using a scientific method :-)
This answer needs another question... What kind of "power" do you need? From the standpoint of inheritance, polymorphism, collaboration .... c + + / java / c # are equal but each with its own special sintax
I agree with Leonardo, in addition there is also an issue of performance, online support and many other aspects. The answer depends on your particular problem.
Ruby is probably a "true" OOP language compared to others. You can write code like 3.times { print "cool"} where 3 is an int object. With others language you'll need to perform the action on the object (i.e console.println("cool"))
I agree with Mahmud. It depends on your problem. Choose the language in which you can express/solve your problem simply. In most cases, the available libraries are important and will guide your choice.
C# is growing more powerful among all and with new features adopted from other languages like introduction of Anonymous Types, Dynamic keyword in C# 4.0. And Look at C# 5.0 which is yet to release and is packed with mindblowing fetures like Asynchronous Programming, Watch the video - http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-816T
The little-known but very much alive OO language Modula-3 still is out ahead for power, yet almost an order of magnitude simpler that C++, Ada, or Java. It has a few warts, but some very power features. For example, the information-hiding supports dividing into an unlimited number of different visibility subsets, and you don't have to guess in advance who you will want for your friends. There is both a garbage-collected and an explicitly deallocated heap. Thread support is built in. A procedure can serve as both method body and ordinary procedure. By default, it's
100% type-safe, mostly statically, but dynamic typing is also available. Unsafe programming can be enabled when needed, but it's not needed as often either. You can optionally program functionally, though that's not as syntactically sugered as in a typical all- or mostly-functional language.
Depends on what you mean by "powerful". Java has an extensive "standard" library and massive availability of frameworks, libraries, etc. So in a sense it might the most "powerful" of all OOP languages.
As said here, this would also depends on your problem domain. C++ could be more adequate.
However, if you mean "powerful" as in full embodiment of the OOP philosophy, Java most certainly is not. Methods are not objects and it has primitive types, for instance.
In this sense of "powerful", Smalltalk (and it's indirect descendants such as Ruby) would be much more powerful.
Actually, I meant a third sense of "power", i.e., alternatives for coding in a variety of ways, to suit a particular need. E.g., while the OOP philosophy is indeed powerful in your second sense, it is far from always the best way. Anyone with plural experiences diagnosing a bug in a program of 10s or 100s of thousands of lines of code under time pressure will be acutely aware that a dispatching call can easily take an order of magnitude more work to follow than a statically bound call. (OK, lets leave statically-resolved, user-defined overloading out of this for now.) Multiply this by many calls, and you can sometimes have a nightmare. And abstraction at best is no help on this one.
So the option to use dispatching method calls when there is genuine need, but static calls otherwise, give a language more power in the sense I mean. If the language offers dispatching calls only, then it is less powerful in my sense.
There are many other examples, e.g., the option to use a heap-allocated array, with dynamic bounds but high space, time, and coding overhead, when really needed, or an array fully contained in another object, when only static bounds are needed.
C++ is probably the fastest OOP language, but I prefer C# which is, on my opinion the real successor of C++ (more than Java) and very powerful. If we talk about flexibility, Python is super.
What is the definition of "power" in your question? It could be interpreted as "expressiveness" which is a moot point because all OO lanuages are Turing complete and hence equally expressive from computability perspective. However, if you are considering a language L1 is more 'powerful' than language L2 iff L1 embodies some OO concept that L2 does not, but all OO concepts in L2 are already in L1 -- then I think Eiffel or Modula-3 would be more powerful than most used ones. If powerful means which one is most used -- then Java or C++ (even though pure OO pundits will not consider C++ as OO language) will take the cake.
I've taught OO programming and also worked in industry and IT research for 30 years. I've used over 55 languages. I've also taught Eiffel and Modula-2 (not 3). I'm currently part of commercial software team developing a large system (3 million code lines, 1000 Db tables) built with 9 languages - but mostly C# and C++.
In my view, C# has continued to mature with the recent addition of new "powerful" type inferred Language Integrated Queries (LINQ) (.NET 3.5) , enriched parallel programming with Async methods (.NET 4.0) and much more with continued migration of function programming features from F# (.NET's FP language) into mainstream C#.
I'm saddened to see that Java is for the most part standing still (recently becoming untrusted and insecure!) due to insufficient investment by Oracle. I'd much prefer some decent competition to C# continuing but currently Java is lapsing on this front. I've developed research projects in both Java and C# but find C# to be more productive overall - LINQ alone has become a major productivity boost. IoC/DI frameworks like castleproject.org further enhance C# productivity.
BTW ... I'm also a Ruby/Rails fan - especially for smaller projects - but dynamic code can have a higher maintenance cost longer term. I think Python/Django is on par with Ruby/Rails with each seeking to match the other on API features and language power (see what some decent competition can do!).
For teaching programming, I personally think a type safe language is best (to "correct you" when you get it wrong) and then as you mature as a programmer ... the power of dynamic languages have their place. Too much power too early gives you too much rope to hang yourself or totally miss the point.
James ... I think J++ is very much a dead language now. Last release was in Visual Studio 6.0 (1998). We're now up to Visual Studio 11.0 . It was replaced by J# which is now also dead (last release was Visual Studio 2005).
FYI ... C# 4.0 also added the Design by Contract pattern originally developed by the Eiffel team. This is another win for C# developers and a very important coding pattern to teach students. Although you might argue it's not a "power" feature, the effect is the same since the improved code quality significantly reduces bugs and code maintenance.
C# 4.0 Code contracts include meta data classes for attributing your code, a static analyzer for compile-time analysis, and a run-time analyzer. Perfect for "auto-correcting" students and getting them to think contractually about state management in their classes. The biggest win for C# isn't just the tools - but that the vast .NET 4.0/4.5 framework APIs now includes contract meta data.
I am frankly surprised by how few answers pointed out the fundamental flaws of the OP's question: what is `power', and how to do you measure it? Plus, why would one restrict the answer to OO languages? In PL research, the trend is clear: state-based paradigms are very difficult to scale to multi-core and cloud computing.
The meaningful question to ask is: are there languages which will make programmers more effective? (Since all 'programming languages' are Turing complete, there is no other real 'power' difference). There are several components to programmer productivity, with paradigm and language details (i.e. C# 2.0 and Java 1.4, for example, are essentially the same language -- they have diverged somewhat since) being one aspect, availability of libraries, IDEs, resources and a community being other extremely important aspects as well. Last but not least, there is the problem to be solved -- no one in their right mind would use a language with garbage collection in hard real-time system, at least not without some extremely strong hard guarantees on WCET of the gc. In other cases, it gets less clear-cut, but there is definitely room for C, Haskell and Prolog (none of which are OO) as 'best' for some problems.
So my answer is actually a question: what are you actually trying to optimize? Without clearly defining your objective function, as well as justifying your (seemingly extraneous) constraints, there is no way to meaningfully answer your question. Those who have answered this question should seriously consider why they thought their answer was 'meaningful' (well, unless it was a pure fan boy answer, which this question unfortunately allowed).
I agree. The original question is not well-formed, because it is too vague. In response to the comments that Java is not evolving, I am happy to announce that Oracle is helping me propose Batches as a future feature of Java. It is an alternative to LINQ and an improvement in several ways. For more information, see:
It is quite possible to differentiate Turing-Machine-equivalent programming languages according to their power [see Felleisen, "On the expressive power of programming languages" ESOP and Science of Programming] and the measure has implications for productivity measures. There are follow-up pieces of work but not enough to apply the measure to a large language.
Even if you could, however, you'd find that people respond to this kind of question from a historic-psychological-sociological perspective. Contrary to rumors, scientists and scientific workers (programmers) behave no more rationally when it comes to science or politics. Both are decided "from the gut" (influenced by historic-sociological context) and then they look for technical reasons to justify this answer.
Hi Jacques .. Yes! You're right of course. The selection criteria is critical for the final language choice. Often someone comes to me to ask my opinion on a 'detailed' technology solution. My first question is ... "What are you actually trying to solve?". Without context the answer is either meaningless or just plain wrong.
Language 'power" I personally think is perceived from either the semantic perspective (what can I express?) or the productivity perspective (How fast and reliably can I code in the problem domain?). Both are always qualified by the domain context.
In the large system I work on we intentionally use 9 langauges for this very reason. We develop real-time high performance traffic management systems. So our server level apps much avoid garbage collection - hence we use C++ and avoid C# in this context. In other cases, we're doing something entirely different like language parsing or code generation so we'd use a domain specific language like ANTLR or template engine. Python might be used when we need dyanamic scripting.
I've tried to hard make a habit of 'crossing the fences' when it comes to choosing langauges. Programmers often mourn the loss of what's missing in the 'new lanaguage' long before they realise the gains. So they tend to get stuck on their 'favourites'. I've intentionally studied as many languages as possible to try to see what's over the fence. This helps you think and perceive much more laterally. Last month I took some async call patterns I learned in Javascript and am applying them to our C# library.
Batches looks very interesting. Parts of it remind me of my first distributed system I wrote back in 1986 to setup student accounts on remote computers. It generated remote shell commands and then used a feature in awk to open a remote shell pipeline to any referenced hostname and then used a feedback look to check the final remote state. So like Batches it could execute arbitrary remote commands pushed from the client.
Since Batches dispatches abitrary client end code to the server so it would rarely be used in any enterprise production system for security reasons since typically the server is trusted but the client is not. Hence it would break this important security assumption that the server restricts what the client can perform. It could be used in the server to server context. However, this would greatly complicate server component testing as the inbound requests are arbitrary code.
In the large system I work on we implement a more restrictive form of remote batching that does not permit arbitrary client code but does permit a sequence of a limited set of stored procedure calls. It supports chaining of output and inputs within the batch. This is implemented in a C# web service and client library. Code generation is used to map SQL stored procs to C# command classes.
Hi Antony: Batches do NOT execute arbitrary code on the server. Where did you get this impression? All they can do it invoke methods that are included in the public interface of the service root. They can NOT invoke static methods, constructors, or any reflective methods. So if your server only published two methods in the public interface, then batches could only invoke those two methods (although they could invoke them multiple times or conditionally invoke them in a batch). Thus the result is very similar to your stored procedure idea.
Thanks for the correction. I confess I did speed read the article so am relieved to discover that I'm wrong. I'll have a closer look and slower read this time.
The language that is perhaps most powerful is Ruby. It allows you to develop applications and achieve aims so much faster than other languages. There is a vast body of Ruby code in the wild and modification is very straightforward too. I have used Java, C++, C#, Python and Ruby for different applications in different areas and found that the crossover between them is not so difficult to master, but then I like programming a lot!
It really depends on what you are looking for. When we talk about computation, no one of them is more 'powerful' since they are all Turing-complete (when I say this I mean Java, C#, etc.., and not the general case for all programming languages, since that would not be true since we can have weaker programming languages). When it comes to performance, and what we mean by OO, it really comes down to several factors:
-Length of code (how much does a programmer need to write in that OO programming language to solve that problem versus in another problem)
-Performance following compilation (related to the last point)
-How much optimization does that programming language allow beyond the problem?
-How many problems can it solve that are standard 'hard' problems when applied to practical problems (say some benchmark)?
-How simple (program size complexity) is the programming language?
Depending on these and possibly more, it can change but, when it comes to powerful, there really is not a 'more powerful language' in the realm of theory of computation to say, since they all fall under the same class as Turing-complete. From this different programming languages or scripting languages can differ on these factors. Some such as Python or Ruby are great at shortening code, but usually this is through hiding a lot of the complication through abstraction (not to mention these are scripting languages), versus say something like C++ which allows for great performance since it can utilize low level functionality from C to boost the execution speed.
I would say probably if I had to use my bets it would be anything related to C (on the factors above), since they can get as close as possible to the low level operations, and can allow for extensions very well to things such as MPI, openCL, and openMP for parallel related computation. But, as I have said before, it doesn't make the programming language more 'powerful'. Theory of computation dictates that all of the programming languages we have at the moment are Turing-complete, which is the best we can do right now, and possibly ever (I predict ever quite strongly due to the limitations of computation).
Probably C++.. But the learning curve for C# is more fast. I also suggest you to try Objective-C. It is a really intuitive alternative to C# and it is strongly OOP. There is also an opensource project named GNUstep to extending Objective-C to other platforms.
There's no such thing as "the best" or "the most powerful" language. Everytime such a question is posed, everybody is busy praising their favourite language.
If you want to do a serious choice of a language, you need to look at several dimensions:
1. Who is your target group - programming novices or seasoned programming veterans?
2. Is widespread acceptence in industry / government / academia important?
3. Do you need any modules or 3rd party libraries for your task?
4. What do you want to develop? For a simple system, a "quick and dirty" language such as Perl might be OK, but if you want to develop a complex system, your choice might be totally different
5. Do you have hardware restrictions? For an embedded system, C might be a better choice as Perl, for example.
6. Are there any political or legacy restrictions in your area, such as government or corporate standards? Overcoming those could be a lot of effort.
So, in short:
1. Set up your criteria list
2. Weight your factors
3. Measure the candidate languages according to your criteria
If you're in a political environment, two additional steps may be necessary:
4. If you're unhappy with the result, repeat from step #2 with more favourable weights
5. Go to your boss with your favourite language and tell him it was chosen using a scientific method :-)
I would agree with "Stefan Schuerge" it depends on what you need to do with the language. Each language has the good and the bad, if you are starting I would pick one that is most popular among those you will work with. They can be a good source of help when you need it.
Python is fast in performance and better for programming in web, Java is good but slow..suitable for standalone system where processing is important aspect..
I would prefer JAVA . Easy to learn and many resources available via internet. JAVA support OO language and widely used in industry as current trend and of course it is open source,
One could argue that almost anything you could imagine being done in an object oriented fashion could be done in Lisp. The important question is not which programming language is the most powerful, but which is the most supportive of how you use a programming language. Note also, that most of the major languages including Java, C++, C#, Python, etc. are evolving to incorporate useful features pioneered by another language. Even if one language gas a feature such as continuations that other languages lack, in two or three years, they will all have that feature, if it is deemed widely useful.