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?"
Is directly proportionate to the amount of /. posts talking down on it.
Fact.
I thought it was the beards on the creator(s) of the language that determines the success?
"Quote me as saying I was mis-quoted." -Groucho Marx
Portability and scalability are what win it for me, I like to write my code once and it's got to be powerful enough to deliver a complex solution.
Procrastinators, Unite Tomorrow!!
Java's well organized, has a great standard library and is (mostly) consistent with itself. Its only problems, as far as I can see, was that it was initially slow and that it marketed itself as a web language, when there were better choices for that.
Disclaimer: I've only coded in Java since 1.5.
What Makes a Programming Language Successful?
those who don't know how to use it.
The lack of type-safe variables, the possibility to write unreadable code, hunt for bugs that are caused because two files are incompatible. Interpreting languages has been tried before, and they are never working for large projects that shall live for a long time and has to be maintained by a lot of different programmers.
Java may be a bastard of Ada, but at least it has some type checks built in. However, it's a bit weak on the side where the user can't control memory management in a good way. Another weakness is that methods can't be declared to allow/disallow the return of 'null' values to be detected at compile-time.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
Power: What can it do?
Performance: How fast can it do it?
Ease of Development: How fast can quality code be turned out by regular programmers?
Most modern languages fail on a couple of these. C is first class in Power and Performance, but it's not Easy. Ruby is okay in Power, and its very Easy, but it's slow. Java is Powerful, but doesn't match C for Performance, and it's not the quickest for development.
I'm sure many fanboys will disagree with my analysis. They'll say "Regular programmers don't matter (C)" or "It's NOT SLOW (Ruby)" or "Development is too quick! (Java)".
Really though, that's what it comes down to. The problem is, that there are unfortunate tradeoffs that have to be made. Most languages have a strength, but they all make sacrifices to be strong.
ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
I think many people fail to recognize that the average age of software engineers has gotten higher and that many have realized that most of the pitfalls in software development have little to do with the language chosen. I would rather concentrate on good engineering practices and refining familiar modules I have developed than learn a new language.
love is just extroverted narcissism
Not to sound too much like Obi Wan, but many of the truths we cling to depend a great deal on our own point of view and all that.
If I was working for O'Reilly, Manning, APress, Wiley, et al I'd say a successful programming language was one which sold lots of books.
If I was a hiring manager for a large software company, I'd look closely at what language allowed the most cheap new grads to work together an produce something resembling quality code.
If I was teaching intro to computer science, I'd worry about what was preparing my students for the rest of their education.
If I was teaching a certificate-level course to people looking to get into the job market quickly, I'd look for the language with the highest placement rate.
If I was a person of little clue, I'd go largely by the hype. Some would go with the mainstream hype, and some go with the counter cultural "that's the big hype, but our language is better" underdog hype.
As a programmer, I prefer the language that helps me turn customer requirements into working programs that fastest with the least fuss on my part, and allows decent maintenance and customization later.
As the owner of a small boutique programming shop, I want my expressive, powerful language to give me an advantage over others using less expressive languages. I'd like to find others who can use it, but a few is alright as I don't need a huge team to work on programs.
Python's success is based on how much python coders bash PHP. The more they attack PHP the better the language gets.
MABASPLOOM!
Every program on your screen and your OS was written in C/C++
The less cryptic the better. This generally means, be C-like in your operators and be easily readable at a loop level.
Having multiple abstractions available. Multiple ways to do the same complex task efficiently, not just for() or while(). Regex plz.
Being able to access hardware directly. This includes RAM allocation.
Few unexpected side effects. Documentation is important for both adoption and maintenance of programs written in the language.
That's all I got.
Often wrong but never in doubt.
I am Jack9.
Everyone knows me.
I review code for security flaws for a living. I am a pioneer in this field and have literally written the book on it (the OWASP Guide and the OWASP Top 10 2007). I've been doing secure code reviews for the last 10 years.
.NET. I haven't reviewed a .NET application this year.
.NET a very distant second.
I've reviewed 400-500 applications (it's unclear to the total number, but I usually do a review every other week, some shorter, some longer).
I've never reviewed a Ruby application or been asked to review code written in that language. I have been asked to review a Haskell application.
I have reviewed:
* 85-90% Java, usually with shell and ant scripts and occasionally some Perl. Some *years*, this is the only language I am asked to review.
* 5-10%
* 5% COBOL. Primarily as a side line - there's a lot of old code to review, but most folks never do.
I've reviewed three PHP applications professionally, all in the last year, even though this is my preferred language to write stuff.
Java is overwhelmingly used in large commercial settings for high value applications, with
I don't get to review that many COBOL or other mainframe apps. I've been doing ground breaking research in this area as there's no advice today. There is a false belief that this code is somehow "safe" as it resides on the mainframe. Nothing could be more wrong.
Ruby and Python, although interesting langauges, has zero commercial penetration, even for worthless brochureware or community apps.
What they do have is an extremely loud fan base. These languages will not kill COBOL or Java any time in the next forty years or so as the fan base is fickle and will move on to the next big thing when it comes along.
Andrew van der Stock
that is going to kill poor Java
It is not the fact that it is overly verbose, too rigid, and is bloated as as a puffer fish on helium.
how long until
Jesu effing Christo.
One thing ain't got nothing to do with the other.
I can't decide which is worse, this particular bit of idiocy or the all-to-common: "dynamic vs strong typing" arguments.
Actually, maybe I'm being to hasty.
The conflation of runtime implementation details with language capabilites, or the above-mentioned typing confusion, does provide a quick and easy way to tell that someone doesn't know what the hell they're talking about.
Don't count out the "dead" languages... IBM estimates that more than 30 billion transactions occur within Cobol programs every day. By contrast, Google averages about 150 million searches each day, or about .5% of Cobol's daily workload.
Rather than a "gee I need a cool website for my mom" choice, perhaps the number of transactions or dollar value would be a better count.
Cobol would probably win, followed by java and the Microsoft languages (C++, C#).
I just started at a new job at the beginning of this year after quitting from my last job where I barely got to do any programming. The place where I work now is a Java shop. I was getting back to Java programming after a hiatus of a few years. For the last few years I mostly doing Perl with a smattering of C (PHP and Javascript on occasion). My experience with Java was mainly from college and a few odd projects I did here and there. The language had changed quite a bit over the last few years and to be honest, I surprised myself by being happy to get back to it (I had some sort of vague dislike for it for a period of time).
The company sponsored a trip to JavaOne at San Francisco earlier this month, for the Dev Team. I also got to go. This was my first time at JavaOne. It was amazing, exciting, and I learnt a LOT of new stuff. The main thing I got from there was that Java, far from being a programming language, is also a platform. There are a lot of new things being built on TOP of Java. For example, Groovy, and JavaFX. Java now has excellent support and frameworks to roll your OWN domain-specific languages.
Python and Ruby are not going to push Java out of the way. For example, you have mergers of Java with these languages (Jython and JRuby). Essentially you have Python and Ruby using Java resources and libraries. I think instead of "dying", Java is just going to evolve into a stable platform that lets you build stuff on top of it.
Vivin Suresh Paliath
http://vivin.net
I like
TFA: "Some languages made strange mistakes. For example Python is a great language but the idea of using indentation as block demarcation really is a cannon ball chained to its feet. While most of the pythonistas defend this idea with a lot of energy, the truth is this feature makes it really a dangerous tool in big, world wide distributed projects - and most important enterprise projects are big and distributed."
Elsewhere: "Python Creator Guido van Rossum now working at Google"
Well. Now I finally know how Google is dangerous.
CC.
TaijiQuan (Huang, 5 loosenings)
What makes a programming language successful?
Same thing that makes a religion successful. Adherents.
Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
Comment removed based on user account deletion
Obviously there's more than one factor to a language's success, but the breadth and quality of the libraries and application frameworks is a huge factor - if you "know a bit" about programming then I'd say that learning your way around a new API is just as much work as learning a new language.
A big plus for C was that it always came with a substantial standard ("de-facto" to start with, then ISO) library based on the Unix API so it was great for writing portable programs - c.f. Pascal where ISTR the core language couldn't even open a named file. C++ was largely popularized by application frameworks like MFC and OWL, and Delphi did the same for Pascal.
PHP is pretty fugly as a language but comes with a huge library of functions and add-ons that are just what the doctor ordered for web scripting - and when people talk about Ruby, do they really mean Ruby or do they mean Rails?
I don't know about Python - it seems to be a secret society rather than a language and you can't join unless you pass this initiation test where someone tells you a corny joke (stolen from an ancient email circular about Unix and Makefiles) about a language which uses leading whitespace to delineate blocks. I always laugh and fail the test, so I've no idea what the real language is like. :-)
In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
TFA:
"Flag on the moon. How did it get there?"
Have you seen the new 3.0 libraries?? MS Application blocks look a lot like J2EE when it first came out + the best of Jakarta that we have all been using for almost a decade. Don't get me wrong C# does a lot of "good" stuff... but a lot of its most "innovative" stuff is just finally bringing it up to snuff with the way we have all been using J2EE since the dot com bust.
Ironically the biggest problem I've had with Java is that, because it is relatively easy for developers to write code using an IDE such as Eclipse or NetBeans in the core language itself, but there are tons of various classes even within the core JRE, many programmers I know who write Java have created a sort of "ecosystem" of artificial complexity.
For example, I worked on one project which was a client/server system which handled maybe 10 transactions per second, with each transaction translating into maybe one or two table updates. The application could have been put together using something simple, like Tomcat and MySQL on the back-end, and something easy to use like an XML/RPC link to the client side. (There were only something like 10 remote procedure calls being made, and this was an internal application, which means the total audience was perhaps 100 people.)
But rather than keep the whole thing simple, we had a whole bunch of "Architecture Astronaut" wannabes who started tossing in third party frameworks like there was no yesterday, without carefully thinking if the framework was needed, and if so, how best to integrate the framework. Before we knew it, the server was broken into 8 separate EJBs, Hibernate and Spring were called in to handle the server side coding framework, and the entire build process was so complicated it no longer could be run or debugged within an IDE--apparently someone on the project didn't understand ant and used makefiles for part of the build. And to top it off, because so many different frameworks were thrown in for no good reason I can determine (there were something like 40 third-party jar files in the build directory), there were all sorts of runtime problems as each jar file was not designed or tested on the full range of Java 1.4 - 6.0 environments.
Now if this was my first exposure to Java, I'd say that while the core language itself wasn't bad, the entire Java ecosystem sucked hard core. But no; it was the developers: rather than keep it simple, they used the 'refactor' button in NetBeans about 100 times too many, until what should have been a one person-three month job turned into half a million lines of crap, that, to their credit, limped along okay.
PHP - Great if you want to get web apps up FAST.
C++ - Great if you want to write OS-dependant apps.
Java - Great if you want to hire a bus-load of CS majors fresh out of university tomorrow.
C# - Great if you want to replace your old VB projects.
Perl - Great if you want to keep your job intact, as no one else will ever able able to read your code.
Python/Ruby - Great if you want to impress PHB's who buy into hype and buzz-words.
That said, the fact that Google apps runs python may see a major shift from PHP in the next few years. It's the only reason I'm starting to learn it. So far, it seems to be a cross between "Perl I can read" and "not quite Java".
(my captcha is develop ~ how apropos)
Quick, sell your Google stock!
There is a lot of solid Python code out there. The best way to write Python is to also write unit tests. Which is a good practice in any language.
Some privacy policy Slashdot.
Java has generics. Unfortunately they're erased, so they're basically nothing but syntax sugar for runtime casts when you want to use generics from another jar. To add further insult, the compiler yells at you whenever you dare to accomplish such feats of reuse, so most of us have to pepper our code with annotations to shut up the stupid warning about erasure.
Java is now adding "closures", which may or may not actually act as static closures, but may just be syntax sugar for anonymous functions instead. We may see them next year if we're really lucky. Meanwhile C# has LINQ, which is statically typed throughout. C# has a BDFL in Anders Helsburg, Java has a committee that puts Ada's to shame.
Done with slashdot, done with nerds, getting a life.
John McCarthy did. They were inventors of COBOL, FORTRAN and LISP - three languages still in use from the 1950s.
I found it interesting in this graph in the article that, beginning around 2004, the popularity of Python closely follows the popularity of Delphi. Is this some kind of flaw in the methodology in how the data was collected, like too small a sample size (as Delphi has nothing to do with Python I think)? Or is there some overall pattern causing this? A few others are pretty close in some spots, too, in terms of first derivatives.
Note that the server isn't really /.ed at the time I am writing this, but is throttling itself based on limitations of the hosting account (says only 10 concurrent servings). If you keep trying (aka refreshing the browser) you will get the image I linked to above.
I'm sorry, the number you have dialed is an imaginary number. Please rotate your phone 90 degrees and dial again.
My god People Know The Answer ... the answer is beyond simple ... and any other answer is simply BS ...
1.) Clear, simple, and familiar grammar/semantics in the core language.
2.) Simple well documented techniques for creating multiple domain specific extensions (i.e. libraries).
3.) Multi-platform compiler/interpreter support.
Now stop wasting my time with this trivial crap ...
Java isn't going to die any more than C. Nor will Python or Ruby die any time in the foreseeable future.
Anyone can play Devil's Advocate and make one language look better than another from some point of view, but the fact is, different languages have their different pluses and minuses. I'm sure Ruby and Python have their pluses, but I don't see them being used NEARLY as much as Java. And take into consideration that Ruby has been around just as long as Java and Python has 4 years on both languages. If they were going to kick Java's ass, it would have happened by now.
I suspect the article is wishful thinking (though I can't read it 'cause the site didn't survive this post). I don't know why people have to make such a big deal about this stuff anyway. Languages evolve and new languages and paradigms will be created in the future. Computer programming is still in its infancy. There's a good possibility that 20-30 years down the road, none of these languages will be around. They may be completely replaced by some far more powerful paradigm we can't even imagine yet.
These kinds of predictions are old and pointless.
What's wrong with Java? Sure I can't slap together a web 2.0 site in 1 day like I could with .net 3.0 or Ruby, but they can't enable a high availability transactional based middle ware system. Java has so many great uses beyond simple web apps, it will always have a place in the enterprise and mobile devices.
You may find my appearance and demeanor foolish, but it is you who plays the fool.
> And repeat smart things like not treating arrays as first-class entities?
> Honestly, C is full of design errors.
Come back when you know how the computer works, grasshopper. C doesn't treat arrays as "objects" because the computer doesn't do that. If you want higher level abstractions, use C++, where you have the nice vector class that does what you want.
From the initial take, the intent of the article could easily be construed to say Java will die. But I thought was interesting that it would be from old age, not from some challenger language.
In many regards, concerning its lifetime, C has been/will be around for a very long time too... Which, I think, is probably one of the signs of a good language. Because if it was so horrible/people could not get their stuff done reliably, no one would use it.
Consider a much earlier example of a math-like language: APL. It allowed concise programs and elegant expression (especially of mathematical ideas, like matrices); it ran in the then-mainstream environment (IBM mainframes); and, it was sponsored by the industry's 800-pound gorilla. And it was the best language for creating write-only programs that I have ever encountered -- think Perl with an extra helping of math and a non-standard character set thrown in. The worst programming assignment I ever had (although I did complete it successfully) was debugging and fixing a financial modeling package written in APL. My take on it was that the programmers who had written it originally fell mainly into two categories:
- Those who were confused by the syntax and concepts
- Those who used the syntax in a contest to see who could be "cutest"
Neither is really what you want going on in an important enterprise-level project.It's hard not to turn this discussion into a war and I do believe that even from a qualitative perspective, this discussion is entirely subjective. Let me preface my comments by saying I work primarily in C#, Java, Ruby, and Python in my job, and previously was a C, C++, Fortran, and Assembly programmer. I know about a dozen more languages as well, so I feel I've at least had exposure to many languages to guage success from a developer's point of view. Generally, I think being good at a certain job/task makes a language successful. There is a corollary that one should pick the best tool for the job, not because it's the "best" language. C++ is successful because it was very fast at the time, had a lot of features people wanted, and was relatively easy to learn. Would I do a web page in C++ these days? Probably not.
If I had to pick a language to discuss and deem successful, it would be either Smalltalk or Lisp. Some people find either of those esoteric or "weird," but I rather enjoy writing code in both. Interestingly enough, in many respects neither language is particular successful in a commercial sense, but very much so for most implementations.
I'll stick to Smalltalk because it's a good example for this discussion. It's a case where popularity in my mind is not equal to success. Smalltalk works because it is simple (there are really only 6 keywords or so and not even really keywords at that) and is designed impeccably. If success is related to imitation and admiration, then Smalltalk is up there. Of course in itself, the language is derivative, but it's well-known enough to claim/steal credit for one of the best implementations of existing ideas. I have to laugh at other languages, especially Ruby, Python, C#, and Java as they are adding language features or libraries that emulate things that have existed in Smalltalk for 20+ years. That's rather laughable, but also an indicator of success.
As the Smalltalk saying goes, "Files? How quaint." The language just proves you can design something successful by simplifying and focusing on enabling people to design and use their brains. I feel like I can focus on code rather than language constraints. Smalltalk coding is like teaching them to farm rather than giving them food. There are obvious merits to both approaches. The fact that the language is still around 20+ years later and gaining momentum speaks volumes.
I think what makes it unsuccessful is that a lot of people have no idea it exists in the first place and how it really works. They might look at it and say, "yeah that looks something like Ruby, so what's the point." Usually I find it's lack of understanding of not only Smalltalk, but the fact that the development environment in many ways is the language. Most Smalltalk implementations simply don't have the problems in file-based languages like disorganized code, "too many classes," etc. So many of the plights in other languages don't happen in Smalltalk because of the design and that to me is success, regardless of the number of commercial installations.
Another issues that has halted the language's success in commercial spaces has been ugly UI. Until recently, most implementations have looked awful. Squeak used to look like a child's toy without customizations (still does to some degree, but there's 100s of customized images floating around the internet now). Visual Works looks like an ugly ms-app sometimes, but is a huge leap over the past. Gemstone Smalltalk has no real UI (but can use Squeak). The list goes on, but the point is that even in dev environments, eye candy has a big influence.
It gets even weirder when you look at Smalltalk and languages from the perspective of supporting products. Databases are probably the biggest, and Smalltalk can work with just about everything, but the simple support for the RDBMS is pitiful compared to most popular languages. Especially in recent years, a lot of that has to do with the Smalltalk view. In the Smalltalk world, it seems stupid not to use an object database at this poin
Bertrand Meyer
Object Oriented Software Construction, 2nd Ed., p. 881
Richard Stallman
GNU Coding Standards
Rob Pike
Notes on Programming in C
Linux Torvalds
Linux Kernel Coding Style
Patrick Lynch and Sarah Horton
Yale C/AIM Web Style Guide
"Reason number 2: Too much noise is distracting. Programmers are busy and learning 10 languages to the level where they can evaluate them and make an educated decision is too much effort."
okay, if you can't bother to learn more than 1 language, then you can't really call yourself a programmer.
If you can read this, I forgot to post anonymously.
I'll take any language that can let me write, read, and understand as fast as the speed of computers is progressing, i.e., exponentially.
I don't give a crap if language xxxxxxx is more efficient, more hardcore, etc. You know why?
Because I don't want to spend a year writing an application in C for efficiency and find out at the end that for a mere $1,000 I could have written the same thing in Python in a month and just bought a faster computer 11 months later.
YOUR time is linear, while the computer's is exponential. You'd be a fool to not take advantage of that and, frankly, type safety, efficiency, platform independence, programming style, power, etc. etc. can all go to hell. Just give me a beautiful language.
As the author mentions, a new programming language is only useful if it addresses a much needed gap in other languages. Java addresses the gaps of memory management, complexity, and cross-platform. Java now has a huge install base, and is serving as a relatively stable language that can do whatever the imagination desires. It's maturing every version, giving it more credibility. It's pretty tough to compete with that.
Learning a new language simply to follow a trend is the sign of inexperience (not youth). Old or young doesn't play into it (although you feel it does). If a new programming language does the exact same thing as another, there is no point to migrate to it. Time and costs simply don't warrant it.
I can agree that learning several languages is an advantage. It helps focus your understanding of programming concepts by having to deal with them in different ways. But if you look people that know multiple languages, the languages are probably going to be from different categories: a low-level language, a high-level language, a scripting language, a compiled language, a web-friendly language, etc.
Btw, the languages I know (and the order I learned them in) are: BASIC, Assembler, C, Unix Shell scripting, C++, Perl, PHP, Java, COBOL. (Yes, I just recently learned COBOL for a new job)
--
Luck is just skill you didn't know you had.
I was on an old dial up bbs once having a fierce argument and was deep into a paragraph lambasting my foe, when a nearby thunderstorm injected about 4 lines of pure static garbage characters into my text, and the techy walked by, glanced at my screen and said "taking up perl?"
So, basically, what you're saying here is: GET ON MY LAWN! or something like that?
hands down, if your programming language doesn't have a GOTO statement, it is a miserable failure
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
I am completely confused as to how the author can even ask the question "Is COBOL a success?"
Is COBOL old? Certainly.
Is COBOL outdated? Yes.
Has COBOL since been replaced by better languages? Yep.
Would you be insane to start a new, large, application from scratch using COBOL? Of course.
But "Is COBOL a success?" Without doubt, yes. Countless millions (perhaps) billions of lines of production COBOL code are still in use. It is still the core behind many of the applications that run our day-to-day lives. These applications have been running for decades with downtime records that would put an average "Web 2.0" app to shame.
Certainly, IBM deserves a lot of credit for this, maintaining pure 100% backward compatibility for those apps for the last forty years or so, but some credit is due to the language itself.
SirWired
20 GOTO 10
As you can clearly see,
BASIC is the Best Language of All Time
BASIC is the Best Language of All Time
BASIC is the Best Language of All Time
BASIC is the Best Language of All Time
BASIC is the Best Language of All Time
BASIC is the Best Language of All Time
I don't like Linux. This doesn't make me a troll.
Take *that* you young whippersnappers! If you want to program machines, you have to learn to think like 'em.
"My country, right or wrong; if right, to be kept right; and if wrong, to be set right." --Senator Carl Schurz (1872)
It's not a very good article. For one thing, measuring language use by search engine hits is silly. Just because it's the easiest way to get a number doesn't mean anything.
The current situation in programming languages isn't very good. It's been 52 years since Backus invented FORTRAN, and we still don't have it right. Let's look at what we've got.
So that's where we are. No really good hard-compiled language in wide use, and the major scripting languages each have some tragic flaw.
Another set of reasons why some languages survive and some don't may be the types of applications they can be used for.
The C and C++ tool set is *never* going away. You can't, in any practical sense, write an OS in java. C and C++ are *the* standard for writing system level software. Most all system software is written in one of them and they are tightly coupled. There is no other language currently or on the realistic horizon that can replace their functionality.
Java, on the other hand, is popular, but has plenty of practical competition, from C#, to perl, to even PHP. Hell, even visual basic has a VM environment.
As a system level guy, I have little use for Java, C#, perl, or the others except as needed for glue between system level code.
Not knowing what exactly "COSA" was, I did the sensible thing and wiki'd it.
Much to my surprise, it redirected me to an article on Sex Addicts Anonymous (I kid you not, try it yourself: wiki COSA).
Upon seeing this, I can't see how it will help computing at all. Hardcore programmers aren't supposed to get laid at all, let alone get laid so much it becomes a problem. But then maybe that IS the problem, maybe all the REAL programmers are off bonking so much, they don't have time to write a decent C++ library for perfect multithreading....
+1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
Ok, I'm going to chime in on this. What makes a good programming language is Strong Typing, Bounds Checking, strong compiler time checks and easy maintainability. One of my favorite languages was Ada, back in the 80's, because it made it very difficult to write bad code. I also used a version of GCC called EGCC which did the same sorts of checks and added run time checks, but it also never caught on. Coming from a Quality Assurance background, Ada satisfies the Maintainability, Portability and Reliability requirements. I was very happy to program in it after coming off Pascal and Modula-2. Marc
In no particular order:
1) Development speed
2) High number of areas the language works well for
3) Low barrier to entry (ease to learn, expense and ease of setting up an initial dev environment to evaluate the language, community support...)
4) Available (cheap) Libraries
5) Industry Buzz
BASIC and Pascal are procedural.
as is SQLSQL is declarative.
LISP, SCHEME and SMALLTALK were all developed when space was at a premium. so, you kept the source file small by using as obtuse-as-possible a syntax.That's not why they're that way at all.
Python's a great language, but that's no reason to get sloppy about the details.
Dewey, what part of this looks like authorities should be involved?
A lot of noise comes up about these various flash in the pan languages periodicallly, but if you look at a chart of language uses, even python that has been around for 10 years or more has only a few percentage points marketshare.
Meanwhile, Java is the most widely used programming language ever, at around 20%.
http://radar.oreilly.com/archives/2006/08/programming-language-trends.html
Whereas C and C++ hover around the 10 or 20% range.
I use python for some small utilities, and in fact I do expect python's usage to increase over time. However, expecting java or c++ to die, is like expecting English and French to die, and some Esperanto to take over.
It doesn't even *matter* that much if there's some language out there that's so much better than C++ or Java (which is debatable, but functional programming fanatics will scream so loudly about it so I'm not going to bother to argue the point), but that fact that such a vast volume of existing code is written in c++ and java, and there are so many tools and libraries written to support c++ and java development, makes it a *huge mistake* to start some kinds of large software development projects in some other languages, where all of these things will need to be written from scratch at enormous expense.
Projects written in non mainstream languages tend to either fall into a specific program domain the language was designed for, or tend to be very small scale, and usually both. There are very few good *general purpose* langauges that scale up and have good library and tool support. Read: There are *two* of them.... well, three if you consider c#, which I don't, because it is proprietary.
You could write your example just as easily like this:
l = [int(x.strip()) for x in l.strip().split(',')]
This version is arguably *easier* to read than your map-and lambda-based example. Map and filter are pretty much superseded by list and generator comprehensions (in fact, generator comprehensions allow for transparent lazy evaluation and are heavily used in good Python frameworks). reduce() is easy to provide on your own if you really need it, since functions are fist-class objects in Python, but even so I agree with Guido that explicit accumulation loops are easier to read than most reduce() expressions.
The only thing that I could conceivably miss are lambda functions. They do occassionally make for tighter and more readable code, but locally defined closures serve the same purpose, so again, there is no loss of expressiveness.
I agree. Procedural programming is the fundamental problem. Arguing about which procedural language will succeed is like Neanderthals arguing which kind of stone will succeed the one before it. And OO languages are procedural languages in disguise. As Anonymous Coward says, we need to get out of the procedural trap. This is why programs have so many bugs. Let's stop hacking and looking for the next great tool, the next fad, and what our friends are using. Let's look at what approach is truly best.
I got the same wiki about sex addiction. After looking at his crackpot site I found out that this miracle called COSA is just a fancy name for graphical programming and data-driven languages (basically what LabView does.) Or what a schematic diagram does.
Guy clearly never used a schematic diagram or he'd know how painful they are compared to doing the same thing in a normal language like VHDL. Need to add an extra input to one of your functions? UH OH!! Time to tear up all your connectors and sit for 1/2 hour redrawing lines. Same thing would take 5s (literally) in VHDL.
Hopefully, the hospital this guy escaped from finds him and returns him to his cell.
I love dynamic languages as much as the next guy, but there is one major item that I think make Java shine: explicit typing in the interfaces. No seriously, hear me out.
One of the great things about languages like Python is that you can shove just about anything anywhere provided the method signatures and properties match what's being executed. But what about when you didn't write the code? Plone (for example) has gotten much better, but when developing for it, it was often a PITA to find out what features were available from the return value of a given function or what features you should be putting into an object. Yes, I know, the documentation for that CMS has improved greatly in the last couple of years, but I got burned a few years back. And I blame the language.
With Java and interfaces, the objects and values passed to and fro are all documented by design. Javadoc, as often as people like to malign it, is so much better than nothing at all and worlds better than competing code documentation generators for languages like Python, Ruby, or Perl.
"Just look at the Python object definition," you say? The problem is that coders tend to mutate the object during runtime, adding *public* properties and methods on those objects. In addition, there are often methods and properties that are completely useless to the given job at hand. Are they needed in a given instance? You cannot know by looking at the object definition. You need a published interface for that, and that's what Java's interfaces do.
At less than five thousand lines of code, any language would work except maybe for Brainfuck, but that's a whole other can of worms. Once your codebase grows and, more importantly, gets more people involved in its development, documentation becomes all the more important. No, Javadoc isn't the "end all, be all" solution for project documentation by a long shot, but a hell of a lot better than nothing, and without explicit interface definitions, no automated documentation engine will help one bit with real problems.
- I don't need to go outside, my CRT tan'll do me just fine.
Your disclaimer is relevant, since you never got to experience most of Sun's big mistakes. Some of them will never go away, like the fact that some of the original library writers didn't understand the difference between byte streams and character streams. But all in all Java has a certain maturity it lacked when Sun was overselling it as the solution to all our problems.
But that's not why Java is in no danger of dying. Like any other software technology, programming languages are subject to lockin, that combination of cultural habits and legacy installations that keeps software around long after it's. Languages seem to be more subject to lockin than other technologies: unless it's a total failure right out of the gate, it soon develops a culture that maintains it, and a big body of software that must be maintained, and is too expensive to rewrite in a more modern language.
Consider FORTRAN. It was the very first high-level language (1953) and is full of design mistakes that reflect a total ignorance of artificial linguistics and compiler design theory by its inventors. (Not the designers' fault, these fields hadn't been invented yet.) And yet it remains the language for heavy-duty numerical processing. A lot of hard science and engineering grad schools rebel when told to learn it, but learn it they do.
Ironic story: I was working for Sun's Java org in 1998, when a corporate reshuffle caused our group to be given responsibility for maintaining Sun's FORTRAN compiler. Everybody's response was: What? Why the heck do we even have a FORTRAN compiler? Answer, the people who buy high-end computers for science and engineering won't even look at your platform if it doesn't have a FORTRAN compiler.
So Java (and FORTAN) will live forever. And centuries from now, newbie programmers will be wondering about those weird classes that are used to handle standard input and output.
One of the reasons that Java became so popular was that it was new during a time that business was making enormous investments in IT. That time has passed, and business is less likely to invest in new languages, tools, etc, regardless of their merits.
Python et.al. are all languages that we who were there in the 80's remember with a combined horror/amusement when we had to write programs in Basic.
You have got to be kidding me.
This is a mistake on the order of "Cats are mortal. Aristotle is mortal. Therefore, Aristotle is a cat."
I'm not a particularly big user of Python, but I know enough to know the comparison with Basic is pretty shallow. There's an interpreter, and there's divergence from C syntax. I think that's about it. And there's all kinds of stuff in Python, Perl, Ruby, and even *PHP* that you could never dream of doing in any Basic I saw during the 1980s.
The lack of type-safe variables,
Type safety. Okay. You're one of those people. You're hereby sentenced to read all of Steve Yegge's blog posts for a year.
Alternatively, you're welcome to cite studies indicating higher productivity for type safe languages.
the possibility to write unreadable code
Which language have you found it impossible to write unreadable code in?
hunt for bugs that are caused because two files are incompatible.
Right. Like there exists a language that addresses this problem.
Interpreting languages has been tried before,and they are never working for large projects that shall live for a long time and has to be maintained by a lot of different programmers.
"Implementations with feature X have failed, therefore any implementation with feature X will fail." That sword can be wielded equally well against compiled "type safe" languages.
The fact that a language has an interpreter that implements it really doesn't have much to do with whether or not it can be compiled. Python can be compiled to Java class files, for instance, and probably a few other targets I don't know about. So can Javascript. Probably Ruby, too.
And as for large, sustainable projects You're posting on a system that's over 10 years old that's built in Perl. You've probably bought books or something else from a bigger site that uses it too. I've worked on a system that predates Slashdot that had a codebase that was 10% Perl and it's still going strong. This is to say nothing of highly visible examples of development in PHP of all things.
I have nothing against compiling when the situation demands it, and I can respect the fact that automatic tools for catching certain kinds of mistakes are helpful. That's not really a function of type safety, however. Ask Perl or PHP (and probably the others) to warn you if you've misspelled a variable or done other "bad" things with it, and they will, for example. But moreover, it's been a long time since most of the mistakes in my programming had anything to do with whether or not I fed the right variable the right type of primitive or reference, and I suspect the same is true of most experienced programmers.
Tweet, tweet.
Since state is encapsulated atomically, the interpreter is assured that function calls cause no side-effects,
This is an often repeated claim of Erlang fanatics. The truth is that, in Erlang, the functions themselves are the states. To say that there are no side effects in Erlang is a lie. Functions affect other functions (states) and if they are called in the wrong order, bad things will happen. Another problem with Erlang and functional programming in general, is that it does not support fine-grain parallelism. There are a lot of highly useful things that cannot be properly parallelized without fine-grain parallel processing, things like search and sort routines (I am still waiting for an effective parallel quick sort routine in Erlang). A third problem with Erlang is that, like multithreading, it is not deterministic. Determinism an essential requirement of reliable software. In addition, functional programming is not intuitive and many programmers find it hard to get used ot. So you people in Sweden and at Ericsson should stop promoting Erlang as the solution to the parallel programming problem. It is not.
Depends I suppose. There are multiple worlds at play here. In one corner, there are the new kids just coming into programming, those on small teams, web developers, thrill seekers. They are looking for languages that offer minimal keystrokes, neat features, quick prototyping (rails!), minimal configuration, etc.
For these people, maintainability isn't really even a remote consideration. For them the critical measurement seems to be the ratio of:
(functionality * fun cleaver features) / (keystrokes * prototype dev time)
They often get bogged down in their own code after the first few releases, but the people who started the project and chose the language are often off to another by this time, and if not they rarely even recognize the additional time spent to repair something later. (and to tell you the truth, if you used prototype development speed to sell the project and delivered the initial prototype and the customer bought it, there is a valid argument that they did the right thing even if it moved time and problems to later in the project cycle)
Another very large (and very quiet) group is more interested in a formula like this:
(Maintainability * Stability * Consistency * Comprehensibility) / (cleaver features ^ 2)
Note that there is absolutely no concern for how much you type here. Typing speed has no relationship whatsoever for how long it takes a large project to come out--it's an inverse relationship in fact. Having to learn something new just to save a few keystrokes is a huge negative (multiply learning time by the 500 people on your team, it becomes like a manyear per feature easily)
This group is huge--it's virtually every team I've worked with, and, of the ones I've known, maybe 2% twitter, blog, read blogs or listen to podcasts. They are not involved in the community, they just work and go home to their families. They are typically comfortable with Unix and A few read
They are generally developing in pre java-6, and often pre java-5. Sometimes because they have to, but often because of stability and huge retesting requirements to ceritfy a new development tool.
In my realm they are almost always Java or C++, although the latter is getting more rare. I'm sure in windows they are almost all using C#.
They usually aren't interested in learning about other languages or complicating the one they are using (although they will use the features if available).
This group ranges from uncreative programmers who struggle with concepts like OO or Generics or (in some cases) pointers and boolean math to are excellent all-around programmers; and many used to be in the first group.
Most are just good programmers that want to go home at 5:00 and spend the night with their families instead of jumping straight on the computer to learn a new technology.
Personally I think this latter group is quiet enough that the industry writers, bloggers and podcasters don't realize they exist, but I'd guess that they are at least 70% of the programmers out there.
If it wasn't for Java and C#, they would probably be using ADA or C++. Ruby and Python would never be considered.
Not every big library is bloated. It's only bloat if it has a poor size to functionality ratio.
For example libc is small, but it does not include XML parsing, HTTP support, SHA1 and MD5 sums, the ability to read compressed files etc. Sure there are libraries for that, but you have to pick and add them yourself. So libc is small not because it is amazingly efficient, but because it is limited in scope.
Personally, I like big standard libraries like Java and Python have. You pay for it in the initial install, but once that is in place, your application has access to a huge amount of functionality without having to add a lot of external dependencies.
You don't seem to be very clear on the differences between strong vs. weak type systems, and static vs. dynamic types.
Python is strongly typed. In every place where a Python program can have a type error, the result is defined: some sort of exception is raised immediately, and can be handled regularly through the exception handling system, or to propagate uncaught and kill your program immediately and in a clean fashion.
C is weakly typed. Many kinds of type error can happen at runtime that will leave your program in an undefined state, which may continue indefinitely. E.g., you can do pointer arithmetic and read data from random locations in memory, and interpret it as any type you want instead of what it's supposed to be.
Python is a dynamically typed language. A valid Python program may not contain enough information to infer the type of the values that are assigned to its variables at runtime; or, in other words, any variable may be assigned any value of any type, values in Python must be tagged with their types at runtime, and Python runtime systems need to check the types of arguments at runtime are compatible with the types of the operations applied to them.
C is a statically typed language. The C compiler must be able to determine, at compilation time, the type of every variable, and every expression must type-check for a program to be valid. The way C ensures this is by requiring type declarations on every variable and function. However, that's not essential; languages like OCaml and Haskell are smart enough to infer the types of most of your variables and functions without declarations.
Now, having said all that, let's quote you:
The main problem with this statement here is that you're not specifying what you mean by "context" here. There are two kinds of context that could be relevant: (a) compilation context; (b) runtime context. As it turns out, Python (because of dynamic typing) is allowed to use (b) to figure out the type. However, a language like OCaml can also "figure out the type by context," in the very different sense that it can analyze the program well enough at compilation to figure out that the variables are bound to ints, without your telling it. (And to make it more complicated: an implementation of a dynamically typed language is not required to check types at runtime in every case. A technique used by optimizing compilers for dynamically typed languages is to perform incomplete type inference on programs, figure out the types of variables as best as possible, and use this information to remove runtime type checks where the compiler can prove that they will always succeed. See this blog post for examples of people who've tried to do this for Python in various ways.)
The phrase "multiply an Int by a String" turns out to be ambiguous. Most of the people who responded to you thought about it in terms of syntax: "foo" * 7. The thing is that Python overloads the * operator, and dispatches it to different concrete operations, depending on the type of the arguments. What Python does do is, when applying a concrete operation, throw the type errors.
But also, that is not what the term "duck typing" means. Read your own link. What you're mentioning is just plain old dynamic typing--raise a type error at runtime when the tagged type of the arguments does not match the type required by the operation.
Are you adequate?
Perl.
"Go ahead, take a bit of the apple. There is more than one way to do it."
Next thing you know there are two naked Perl programmers standing around, who quite sensibly made the decision to cover up because "naked Perl programmer" is a scary, scary concept.
Help poke pirates in the eyepatch, arr.