What Makes a Programming Language Successful?
danielstoner writes "The article '13 reasons why Ruby, Python and the gang will push Java to die... of old age' makes an interesting analysis of the programming languages battling for a place in programmers' minds. What really makes a language popular? What really makes a language 'good'? What is success for a programming language? Can we say COBOL is a successful language? What about Ruby, Python, etc?"
I mean 1,000 lines of C++ and C# compared... I'd expect to see fewer errors in the C# and less severe errors when I find them.
:)
Depends on your skills. C# is a safer environment, but C++ has immensely more expressive power. With modern and well-coded C++, these 1,000 lines may equal to 10-20,000 lines of C#/Java. Unfortunately, the ugly C++ syntax and its C cruft make unlocking the true advantages of C++ a black art.
A trivial example is the STL. Java/C# containers don't come even close to the STL's power. Go further and look at Boost.MPL/Fusion/Proto, and you'll see stuff you simply cannot do with Java/C#.
Well. If it were by me, Lisp would be king. But its not a perfect world
This sig does not contain any SCO code.
Repeat after me:
C++ is NOT a "Microsoft language".
This sig does not contain any SCO code.
Are you serious? Where I work, we regularly use at least three Java applications, and each one requires a particular version of Java, none of which are the same. One of them requires Java 1.5, while another one will break completely if Java 1.5 is installed. It's a nightmare! And while yes, the version requirements may be the fault of the developers, the fact that it can happen at all is unacceptable. Erm, you must be running windows and don't have a sysadmin with a clue. You can run as many versions of JDK in parallel as you want and they will not interfere with each other. Its not rocket science, just set a few env variables. Thats actually one of my favorite things about Java - you are never tied to a "system" install of JVM - in fact you don't even need root privileges to install JVM.
-Em
RelevantElephants: A Somatic WebComic...
Need code that you KNOW has no errors aside from logic errors on the part of the programmer? Use Ada. That's really where Ada fits. You can do very little wrong without the compiler screaming at you and then failing to compile. Like as in, things that cause C "warnings" cause Ada to fail compilation until you fix it. Need to rapidly produce major components, and easily wrap C for the lower level, more performance intensive stuff? Use Python. No, really. That seems to be Python's main niche. It's a great language for writing large blocks of program logic very quickly, is poor at low-level stuff, but can trivially wrap C to do the things it is very poor at.
Are you talking about the section 10 labeled "Python Pre-2.1 did not have lexical scopes."?
If so, your criticism is bizarre, the example is written to illustrate that "Python Pre-2.1 did not have lexical scopes.", not to illustrate the shortest way to rewrite the built-in sum function (you realize that right, that the idiomatic implementation of sum in python is the built in function?).
The reason map and reduce aren't cared about is that most people have an easier time with list comprehensions. Your code:
l = l.strip().split(',')
l = map(lambda x: int(x.strip(), l)
can be written as:
l = [int(x.strip()) for x in l.strip().split(',')]
in python 2.4 onwards. Obviously, you could put that on as many lines as you wanted. If you are worried about performance, generator expressions are very similar to list expressions but lazily evaluated:
g = (int(x.strip()) for x in l)
g would then create items as they are called for by some consumer (for instance, a for loop or a container object).
Nerd rage is the funniest rage.
You've probably never done any coding in Python. Check out the book Dive Into Python (it's free and online): http://www.diveintopython.org/ Even browsing through it will give you a better idea of what Python is good for.
Personally, I think of Python as a prettier and more coherent version of Perl.
That article is basically a rip of this one by Tamir Khason. Heck, it's essentially a blatant copy of the 2004 version of Tamir's article with some of the 2008 pictures thrown in!
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Set the JAVA_HOME environment variable to the path of the JRE you want to use. It's commonly done in a .bat file launching the application.