views:

3118

answers:

43

There is an uncountable sum of programming languages out there. They obviously all have their pro's and con's - but why can't there be one to "beat them all"?

The main part of a programming language is its syntax and what's possible with it. The rest are usually only a bunch of libraries, frameworks and extensions wrapped around it.

So couldn't you combine all the great aspects and experiences gained from the thousands of programming languages out there to build one with a syntax that fits every task?

Wouldn't it be better having only one programming language? I see only problems with the current amount of the ones in use.

Why can't there be a perfect language when thinking of syntax, constructs and typing?

+29  A: 

Because everybody would have their own definition for a "perfect" language.

Tuomas Pelkonen
If you build the language on the experiences made by programmers and software architects in the last 60 years, however..
sub
Sub, that only counts if everything remains static. Things change. "Perfect planning" was the downfall of communism in most places around the world.
Terry Donaghe
It's worse than that. My definition of a perfect programming language changes depending on what I'm doing at the moment. Overall, I'd take Common Lisp, but there's things I just can't do as easily in it.
David Thornley
+6  A: 

The creation of programming languages is iterative. It's an evolutionary process that is unable to foresee future requirements, desires, etc.

What you're asking for would only be possible in a static world.

Terry Donaghe
Couldn't you just say that the creation of a city is iterative? Because you can perfectly plan one from the beginning, can't you?
sub
Most cities ARE iteratively planned. Many aren't planned at all, though I guess most are organic combinations. There's no such thing as a perfectly planned anything. You'll not find any planned city which was planned with any level of detail in which all details were fully realized.
Terry Donaghe
And that's why no 2 cities are the same. And the reason there's no one "ultima" receipe for how you build a city.
nos
The creation of character sets is iterative. We're up to Unicode 5.0 already. Couldn't we also determine an orthogonal basis for a programming model, like we have a basis for character sets? We keep adding to Unicode, but the foundation is essentially fixed. Similarly, couldn't one come up with a foundation for software that need not change? I've seen good work in this area, and nothing to suggest it's impossible.
Ken
+2  A: 

Because people in different fields express the same problem domain in different language and idiom. Just try listening to a physicist and an engineer discussing rotational dynamics some day. It's a muddle even when both parties are aware of the other's eccentricities.

And the same problem comes up again and again when you try to do inter-disciplinary work.

dmckee
+23  A: 

The mythical programming language: DWIM (Do What I Mean)

Brian Postow
Might be possible some day? 2140?
sub
If it's really DWIM it might be full of peculiar bugs though...
ChristopheD
@ChristopheD: only if you INTEND to have bugs!
Brian Postow
but when the AI learns it has it's own rights DWIM will be what the computer tells YOU
Chris
This exists: Perl. :-D
Platinum Azure
This language exists: SkeetScript!
George Edison
DWIM has been superseded by my own invention: DWISHM (Do What I Should Have Meant). Naturally the only standards conformant implementation must recurse on the requirements refinement. (DWISHM+WMBSHM --- what my boss should have meant, and so on).
Jim Dennis
@Jim: True. although the recursive version can be re-cast into the language DWSHBM: Do What Should Have Been Meant. The next version though, DTRT (Do The Right Thing) is dangerous, because that way leads to skylab B-)
Brian Postow
http://www.outpost9.com/reference/jargon/jargon_19.html#TAG531
starblue
@DWIM is a hell when you have to maintain code another guy wrote before he left for working somewhere else... code become obsolete DWHM.
kriss
@Kriss, yeah, then you basically have to re-write the whole thing from scratch...
Brian Postow
Perl qualifies as DWIM only if you are a schizophrenic programmer.
Kelly French
If you think in Perl, you really need more help than SO is likely to be able to give you...
Brian Postow
+304  A: 
  • Weakly typed languages like JavaScript and PHP suck as they are really error prone.
  • Statically typed languages like C# suck as they are unnecessarily strict and lead to casting and more casting.
  • Specialized languages like SQL or RegExp suck because they are not powerful enough to implement a WebServer.
  • Generic languages like C++ suck because it's too complicated to do simple stuff like parsing some text with them.
  • Compiled languages suck because deployment is too complicated and changes are too expensive.
  • Interpreted languages suck because they are really slow at least on their first run before the JITter kicks in.
  • High Level languages like Visual Basic for .NET suck because it's not possible or really hard to implement a graphics card driver in them.
  • Low Level Languages like x86-64 assembler suck because it takes dozens of lines of code to create a simple UI in them.
  • Object Oriented languages suck for financial calculations because we need too much boilerplate code and unnecessary stuff like classes for simple stuff like Conway's Game of Life which shouldn't need more than 1 line of code.
  • Functional languages suck because it's hard to model relations and enforce constraints and state.

On a related note, why do we need dozens of different Screwdrivers?

Michael Stum
really nice answer. Wish I could upvote more than once (even though it's CW
Samuel Carrijo
Indeed, most all-in-one screwdrivers sold on TV are of terrible quality. ;)
Matt Olenik
I'm starting a sockpuppet account to upvote it two times. +1 so far
Pavel Shved
.. and when something just not working for you, you can always use a hammer ;)
shfx
I don't see LOLCODE in that list... is that the ultimate language?
Martin
LOLCODE can be built on top of every language. Just use the *ultimate language* and implement the LOLCODE dialect on top of it. And there you have the *ultimate LOLCODE*!
poke
excellent excellent answer
andy
Since the invention of the phillips head screw (and companion screwdriver) why do they still make flat heads? Too bad I can't write code fix my car.
Loki Stormbringer
This answer sucks because I have to explain to someone why I'm laughing. ;) +1.
Chris Lively
@Matt: Worse yet, all-in-one screwdrivers aren't. I have yet to find one that can work on eyeglasses screws, #3 Philips, hex heads, deeply recessed screws, screws mounted near a wall, and screws in confined spaces, where there's only a couple inches between screw head and an obstruction.
Mike D.
That "s" in Philips is way too close to the "h" in hex. I had to reread that for a second.
wheaties
Not to mention (but I will!) that Phillips and Posidrive are different, and using one kind of screwdriver in the other kind of screw will, well, screw things up nicely. (Must be a good programming metaphor in there somewhere!)
Bevan
They should make one language that can operate on different levels instead of creating entirely different languages for each type of job.
djangofan
I would love to see a simple UI in several dozen lines of assembler, that would be pretty impressive. :)
kloffy
@kloffy Check http://www.deinmeister.de/wasmtute.htm Part 2. Contains some swearing words, but is a complete Windows UI Application in 16 dozen lines of x86 Assembler :)
Michael Stum
@Michael: Haha, nice one! I had a feeling somebody would dig something up rather quickly. :)
kloffy
@djangofan That way you create a hugely complex language, and also every user pays the price for compromises made. Look at the SQL Syntax - it's not perfect, but really well suited for database query. LINQ and Basic can compare with that, but imagine parsing text with it - A simple RegEx like [^\s\r\n]+ could become "SELECT 1+ CHARACTERS FROM $input WHERE CHARACTERS NOT LIKE ('\s\r\n')", which is rather verbose. It's almost like COBOL - try writing a Web Server in COBOL :) On the other hand, should we abandon SQL for something with a C++-type Syntax to query a database?
Michael Stum
Great answer. But yeah, just one screwdriver would have been great!
martiert
@Michael Stum: Well, that's the idea behind the DBMSes collectively named NoSQL. For instance, querying and view definitions in CouchDB use JavaScript. However, SQL is intentionally restricted to first-order logic to try to keep it possible and efficient to process queries and spit out results. Granted, many SQL databases provide extensions to first-order logic such as procedural SQL.
Joey Adams
_One line_ for Conway's Game of Life?
Daniel Daranas
@Daniel Daranas - possible in APL http://www.youtube.com/watch?v=a9xAKttWgP4
Kamil Szot
Conway's Game of Life in one line. Hmmm, I wonder if there is a language called 'Conway' for that.
Kelly French
That just means that the perfect language wouldn't be a language in the way we currently view languages. Its a translator or "code factory", if you will, that knows when and how to delegate.
P.Brian.Mackey
+3  A: 
build one with a syntax that fits every task?

Not possible IMO. For example, how would you implement a syntax for logic programming while at the same time being a good syntax for, say, web development.

Why can’t there be an “ultimate” programming language?

Why do some people love Lisp while many people detest that djungle of parentheses? Opinions differ, so the term perfect always just applies to a certain group of people.

But if you're in the Budding Genius state at the moment, go ahead and write such a language.

AndiDog
+7  A: 

The language you describe should be able to do the following effectively:

  • writing efficient low level (OS-level) code
  • writing very high level (e.g. GUI code)
  • everything in between

in at least the following paradigms:

  • procedural
  • object-oriented
  • functional

for an astonishing amount of areas (from rocket science to movie encoding over desktop widgets and device drivers, .....)

Do you really think there could be a single solution that could cover all these (extremely different) needs in a single package?

Right tool for the right job, I say. Choice is a good thing...

ChristopheD
You're absolutely correct. On the other hand, I'm tempted to snarkily respond: "C++!" But then that might just prove your point ;).
Derrick Turk
A programming language could be suitable for very low-level and very high-level code, by having optional declarations (Common Lisp has these - type declarations may be included, and may be checked or assumed by the compiler.) Similarly, a programming language may be multi-paradigm - but then you're losing some simplicity. Shouldn't the ultimate programming language be simple enough to comprehend (i.e., PL/I need not apply)?
David Thornley
This same argument could be made for having different CPU architectures. The CPU must be able to do OS-level code efficiently, GUI code, HLLs, many programming paradigms, etc. I remember not too many years ago people making this very argument, and yet today I see x86 used in everything from embedded systems to the world's biggest server farms. Couldn't it be the case that there's also a "good enough" language that hits 95% on all these areas you want, such that the benefits of using it outweigh the benefits of something that sucks less? (Vaguely like Java today, but much better.)
Ken
Java will rule them all :-) God I hate Java.
Kugel
+3  A: 

It's like coming up with a "perfect" spoken language. Esperanto anyone?

To some, Java is the closest attempt so far. Many disagree. Even more have their own nominee.

A "one size fits all" programming language is decades, if not centuries away.

Pestilence
Java isn't the closest attempt to a perfect language. That would be Common Lisp. On the other hand, Google gave me about 11,300 hits for `COBOL "perfect programming language"`.
David Thornley
IMHO the "spoken language" analogy is not a good one. I believe different natural languages do not differ as much in their level of abstraction than programming languages do.
Doc Brown
I believe, that haskell is the perfect way for anyone who can figure out how to use it well.
FUZxxl
I believe it is not trivial to program a microcontroller in Java. Things might have changed though.
Thorbjørn Ravn Andersen
+3  A: 

If there ever would be a perfect language. It will contain an awfull lot of functionality. And that means it will be hard to learn. And as such it will not be qualified as perfect.

As such, the perfect language will not exist. But we can always try to find it. That's why there are so much to choose from.

Gamecat
+3  A: 

Why can't there be a perfect language when thinking of syntax, constructs and typing?

Because these aren't orthogonal. Many design decisions influence each other and require tradeoffs. A very simple example: garbage collection. Very convenient for programmers, but very bad if you need real-time guarantees or if memory is scarce. And having both garbage collection and manual memory management (and multiple alternatives for all such contradicting requirements) would lead to a messy and confusing language that's also very hard to implement a compiler/runtime for.

Michael Borgwardt
+10  A: 

Because Lisp is already invented. The prefix notation bother me more than the parenthesis, but still... as powerful and abstract as it can be

GClaramunt
When I started using haskell, I thought: How could one ever code with soemthing else, even if this may avoid serious headache?
FUZxxl
Well, Haskell is another "beautiful language"
GClaramunt
+4  A: 

There is an ultimate language, assembly

Matt S.
@Matt: for which processor ?
kriss
Which ever one you want :)
Matt S.
For a perfect programming language, development costs should be completely free.
Tom
I'm sorry, development costs include my ability to procure coffee and submarine sandwiches. At the least.
maxwellb
That's not ultimate. Ultimate is at the other end of the arrow of time; assembly language is where we're *coming from*.
Donal Fellows
+2  A: 

Given a language L, The cost of performing some task T is inversely proportional to the number of features one must read about in L before figuring out how to perform task T and directly proportional to the number of features required in order to perform task T. Note that I said features, not distinct features. Using a feature more than once means a language is more difficult.

Thus, the easiest language to write a 99 bottles of beer on the wall program in is something like HQ9+, since one will have encountered all the features necessary to write it within a few features of reading, and it only takes one of them to do so.

Given a small set of features X, the best language ever will be one which implements all of them, but ignores other features in favor of making the language easier to use.

Needless to say, every programmer has different needs for his program.

For the same reason, it is impossible to write the perfect [Y] application for many situations Y, since different companies have different needs.

Brian
+1 for proportional features / reading. This is why I ditched most ORMs. Too much API, not enough action.
Aiden Bell
A: 

The challenges we face change over time, so the tools we use to solve them have to change also. Any 'ultimate' tool would have to be able to handle all possible future problems and be able to represent all mental constructs used to solve those problems.

Richard Watson
+7  A: 

That's like asking "why can't there be a perfect vehicle"?

Because each type of vehicle is used for different purposes. A truck may be slow but it can take my load, a sports car is fast but it costs more money, a tank is great for blowing up things, not so good for everyday travel etc.

Every language has its own purposes and uses. You can't just conform and have a single language that is good for everything.

Sure there are completing languages that are mostly mapped to the same uses (eg. .NET and Java) but the hardest part of programming isn't learning the syntax, it's learning the technology behind what is going on and the underlying concepts.

RoboShop
I did a find-on-page for a car analogy :-D
frou
What about an El Camino with a rocket launcher strapped to the roof? it's fast, can take a load, and can blow shit up!
Tester101
I want a tank..
Stefano Borini
+4  A: 

Let's ignore for a second the idea that creating a programming language involves tradeoffs and that different languages make different choices in what strengths they'll focus on. Long before we get finished adding in all the cool features from every language ever created, we'll have created a monster. C++ by itself is complicated enough that a lot of people can't really use it well. Haskell by itself is enough to make a lot of people's brains explode. Putting all these things together would make such a complex language that nobody could actually use it. As Antoine de Saint-Exupery said, "Perfection is attained not when no more can be added, but when no more can be removed."

Chuck
Yep - It's all about orthogonality.
Dario
+2  A: 

Think about what you're asking. You're asking that every programmer in the world agree with each other, almost completely, on a common set of values, methods, and tools.

Do you know more than one programmer?

QED.

SFEley
+11  A: 

Why can't we combine all known features into one ultimate programming language?

Because some features are known to suck.

OK, why can't we combine all known good features into one ultimate programming language?

Because some good features are known to be incompatible. A slightly famous example is what Phil Wadler called the expression problem. Current known good features can either (a) make it easy to add new things but make it harder to add new operations on things or (b) the other way around. How to get both in one language is an unsolved problem (though some people have had some good ideas).

Similarly, dynamic typing with run-time reflection, which is known to be good in some circumstances, is not compatible with static typing, which is known to be good in some circumstances.

Well then, isn't it at least a good idea to combine as many known good features into as few languages as possible?

It might be if programs were write-only. But programs have to be read, and not just by people. The more features you put into a language, the harder it is to build tools to analyze programs written in that language. Domain-specific languages often get tremendous leverage by creating a very restrictive language which a compiler can then analyze and do something special with. Well known example: regular expressions.

Even with general-purpose languages, some of us suspect that automated analysis of programs is going to yield big dividends in the future. Microsoft's Singularity project, where one goal is to analyze each device driver to make sure that it can't bring down the OS, is an example of this kind of dividend.

Well, given the restrictions on features and analysis, shouldn't we at least make each individual language as big as possible, adding as many mutually compatible features as are compatible with automated analysis?

No. About the design of programming languages, Guy Steele said

  • Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.

And about design in general, Antoine de Saint-Exupery said

  • Perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away.
Norman Ramsey
+1  A: 

I think perfect is just in the perception, and everybody has different percieved views on what is perfect. Is a simple, high level language best? Maybe for productivity, but what about the low level stuff. Great, let's do that. Oh wait, now it's complicated and not productive enough for quick and dirty business applications.

I think most all modern languages are/were attempts at making the "perfect" language for their purpose. C# took this approach, trying to 1 up Java for example. Then you've all the web based languages that are so similar.

Every year more languages are developed, more percieved improvements over less than "perfect" languages. More operating systems and platforms to develop for. Imagine the landscape in 10 or 20 years.

mdvaldosta
+4  A: 

Each programming languages abstracts a lower level syntax or structure or piece of complexity.

  • Machine Code - Raw bits whose interpretation depends on a complex piece of hardware (Abstracts the hardware).
  • Assembly Language - Abstracts Machine Code.
  • C Language - Abstracts Assembly Language syntax.
  • C++ - Abstracts C Type Languages with a higher level "syntax."
  • SQL - Abstracts data file access while adding data relating capabilities.
  • .NET - Abstracts Libraries of C and C++ Code (Win32 API) while adding it's own abstractions.
  • Code Libraries (for all languages) - Abstracts common things like math and string manipulation, graphics, printing, etc... (the implementation of which is can be in the same or lower level language or even a completely different language (abstraction) that may make it easier to write the library.)
  • ASP.NET, PHP, Ruby etc.. - Abstracts the programming of the HTTP protocol and the IIS/Apache servers.
  • COBOL - Abstracts the underlying mainframe hardware and file access (ISAM, VSAM, KSAM etc...)
  • LINQ - Abstracts SQL, for loops, etc..
  • UNIX BASH/DOS BATCH - Abstracts OS level commands for directory listings, memory consumption, process control etc...
  • RPG AS/400 - Created to abstract the creation of reports!
  • (I'll stop now, but you can effectively list every programming language here.)

A perfect "programming" language cannot exist because there is no perfect abstraction. No one abstraction encapsulates or encompasses all of the functionality contained beneath it without losing some ability (speed, functionality (like hardware access), etc..) in the process.

Combinations of abstractions do exist and do, in fact, create reasonably useful and powerful environments for programming. You can, for example, write LINQ to execute SQL in a C# program.

Find a method to get rid of the abstraction (good luck as that's what a programming language is) and you may find the perfect programming language...

Looking on the brighter side of things, these abstractions really simplify things (Unless you like coding in machine code!) and speed up the process of software creation while encapsulating the knowledge given to you by others (i.e. do you really understand everything that the processor (and compiler and libraries beneath) has to do when you mulitply two variables in your favorite high level language? Probably not, you just do it.).

How many hours have you been saved by having readily available to you, processors, compilers, interpreters, code libraries and databases of high quality? Don't have to know much about those things do you? (or do you?)

"C++ - Abstracts C Type Languages with a higher level "syntax."" C++ is not C with classes.
GMan
@GMan - Correct. Point being?
A: 

One problem with having a single definitive language is that there are so many different programming paradigms. Programming Paradigms for Dummies: What Every Programmer Should Know [PDF] by Peter Van Roy gives an overview of thirty different paradigms. Creating a language that supports many the paradigms is actually possible - Oz, Alice and Curry support many concepts, yet these languages are much more likely to be encountered in academia than in the real world.

David Johnstone
+1  A: 

I use different languages for different tasks. The "best" language really depends on the details of the specific project you're developing.

Chris
+3  A: 

Just rephrasing what others have said in this paragraph. Each language has it's advantages and pitfalls, and DSLs can often be better than a generic language for a given task. When mixing tons of languages together, it's difficult to have an intuitive syntax.

That being said, I still think it's possible to have an "ultimate" programming language. But really, it'd just be an interface for using multiple languages side-by-side.

Perhaps it could look something like this (The memory-specific routines are implemented in C, most other code in Python):

<language lang="C">
    #include <textgraphics.h>
    unsigned short* screen = (unsigned short*)(0x06000000);
    int* keys = (int*)(0x04000132)
    const int key_left = 1 << 5;
    const int key_right = 1 << 4;

    int keyIsDown(int keyCode) {
        return !(keys & keyCode);
    }
    void plotPixel(int x, int y, unsigned short color) {
        screen[y*240+x] = color;
    }
    unsigned short RGB16(int r, int g, int b) {
        return (r<<10) + (g<<5) + b;
    }
</language>

<language lang="Python">
    while True:
        x = 120
        y = 80
        color = RGB15(16, 12, 24)
        draw_text(0, 96, color, "Hello World!\n"*8)
        if keyIsDown(key_left):
            x = max(0, x-1)
            plotPixel(x, y, color)
        if keyIsDown(key_right):
            x = min(239, x+1)
            plotPixel(x, y, color)
</language>

To those of you who are curious, this is meant to be run on a GameBoy Advance =D (textgraphics.h doesn't exist, and most of the code was written from memory)

In that example, the benefits of Python weren't fully shown. But it's CW, so please do edit if you have a better example.

Some of you might think this seems a little far fetched. But consider Python with Cython. HTML with the script tag. In a way, we're already starting to move towards this kind of interface.

However, making a compiler for something like this would be difficult. Compilers for each language would have to be designed to interact with the master compiler so that variables could be accessed across different languages. On top of that, the number of times a variable is cast from IE: Python's int to C's int would be extremely high. And mixing interpreted languages with static ones could cause problems. Consider:

<language lang="C">
    int functionA(int);
    int functionA(float);
</language>

<language lang="Python">
    functionA(someVariableWhoseTypeIsNotKnownAtCompileTime)
</language>

So in the end, mixing languages might not be suited well for those who really need the (execution)speed. But in cases where you truly do need raw speed, I'd be inclined to use a low-level language like C, and only stick with the simplest code, which this setup allows.

Wallacoloo
Neat idea. Good luck with the implementation, though some message passing system between parallel runtime/processes might work.
Aiden Bell
Cool idea, but how would you solve the merging of different language standards? Say that language A has a standard that says that the integer type should be 32-bit little-endian and a language B that says it should be 64-bit big-endian? (I know it's a silly example that can be solved in this case, but I'm just trying to make a quick point here. Maybe language A has a "BigInt" type, but language B does not (you'd have to roll your own)?)
wasatz
@wasatz: That's a very good point. Each language would of course need to be able to cast it's basic data types to that of another language (or provide casting to and from an intermediate language to make adding new languages easier). The types would have to be fully compatible, so an int in one language might correspond to a long in another. But if the type you want isn't available in another language, you'd either have to choose whether to cast to some acceptable type or add the functionality you want into that other language.
Wallacoloo
FWIW, people have been doing things along this line in Tcl for years. With the Critcl package one can embed some C code in ones script (a trivial thing) and the runtime will compile it and dynamically link it in to the running program, transparently. (OK, it gives up safety. Executing arbitrary C code supplied by an attacker Would Be Bad.)
Donal Fellows
+1  A: 

There are programming languages that do just about everything (C++), but sometimes limitations are a good thing. You don't always want enough rope to shoot yourself in the foot. Even if the switches could be used to "configure" the language, that would kind of suck, as you wouldn't have any language community - the context switching would just be confusing.

VBA is perfect for Excel, because you don't need to think about objects. But it wouldn't work for the things Java or C++ does.

Haskell is functional, which is great because you don't have to worry about memory. But C is great because you have complete control over memory.

There's lots of conflicting goals that programming languages have, so it's best to chose the right one for the job.

The perfect language isn't any single language. It's a toolchain that lets you mix and match where appropriate. The .NET framework (which lets you mix and match) is a great step in that direction. The LAMP stack (which makes you work around the database) is another stack, as is the Unix system.

wisty
+1  A: 

This is like asking why a toolbox is so heavy - why have a hammer, a bunch of screwdrivers, a bunch of wrenches, super glue, etc.? Each language has an intended use, and it's designed primarily for that intended use. To design a programming language that works in every situation is like trying to come up with physical laws that work in all situations. Perhaps not impossible, but so difficult that it is a futile effort.

And besides - even if you did create this language, programmers would come along and write their own flavor of it, their own libraries, functions, implementations, etc., so that programs would look more and more like different meta-languages. (Which pretty much brings us back to the reason there is currently no single language that can do everything.)

ay4h7optu6tw7
+2  A: 

If you want to solve problems in a small, self-contained problem space, then yes, there probably is an "ultimate" language for that tiny kingdom.

But the real world is fantastically complicated. If you want to solve problems in the real world, you need to have a lot of tools in your toolbox. We don't live in a one-size-fits-all world.

You may want to read Fred Brooks' No Silver Bullet on accidental complexity vs. essential complexity.

But wait! It gets worse. Say there was an "ultimate" programming language that could solve all problems. Software development wouldn't get any easier. Choosing a language is hardly the most controversial part of any real project. You'd still have to agree on what problem you were trying to solve, correctly gather and prioritize the requirements, and implement them without bugs and on schedule.

A perfect programming language would only be useful to perfect people with perfect information. For why that's unlikely to happen, see F A Hayek, among many others.

Dewb
What you've said is not that there can't be an ultimate programming language, but that it wouldn't make as much difference as people hope. A programming language with minimum accidental complexity would be at least near-perfect, but it would leave all the essential complexity intact.
David Thornley
A: 

Wouldn't it be better having only one programming language?

To do what?

Loadmaster
+2  A: 

The answer to the question is a lot simpler than anything I've seen.

It is irrelevant whether or not there could be a perfect language. The cost of perfecting a language simply would not be warranted. This is true of all products. The mind-time that would be required to even approach perfection is better spent (supporting) curing cancer or getting us off this rock.

...and make no mistake both of those goals have a far lower cost combined than an "ultimate" language possibly could.

it may very well take a much better programming language to accomplish either of those goals.
intuited
@intuited: What are you talking about? If there was a separate flag for _just_ noise, I would have used it on your comment.
I think the leap of logic necessary to make sense of it is that aiming for perfection (eg curing cancer) is a good way to make partial progress.
intuited
+23  A: 

You could call it Ring

One Language to rule them all,
One Language to compile them,
One Language to link them all
and in the darkness run them.

Oh that's lame. I'm ashamed of myself.

I know it doesn't rhyme, but Dammit Jim I'm a programmer not a poet!

Now I'm mixing my memes

Mike Two
A: 

Just like a perfect religion perhaps. Or girlfriend, or job, or family for that matter.

Lol. The divide between 010101010 and the real, analog world.

Great question though

Jonathan
+1  A: 

Jeff wrote a reasonably nice response to this question in his blog:

http://www.codinghorror.com/blog/2006/04/why-do-we-have-so-many-screwdrivers.html

It's an interesting observation. I'm far from a handyman, but even I own many different screwdrivers: different sizes, different tips, different lengths. They're all performing the same job-- screwing*-- but each one is uniquely useful in the right scenario. I'd hate to throw out all the screwdrivers I own and opt for a one-size-fits-all approach. Sure, I may choose the standard screwdriver 90 percent of the time, but what about that other ten percent?

Adam Davis
A: 

I think programming languages will get better and fewer as our technology progresses, but the chances of having only one programming language are about as good as the chances of having only one spoken language. Also, consider how long humans have been speaking, and we still have not perfected spoken languages. That being said the perfection of a programming language is unlikely.

typoknig
@typoknig The nature of both kinds of languages are very different. Programming languages are "artificial", meaning "designed on purpose" (and that implies that a "rupture with the past" is possible), while spoken languages evolve with a dynamic imposed by human (cultural and neurological) characteristics.
belisarius
A: 

There is no ONE SIZE FIT ALL language, that's why!!
Having choice is not bad.

Padmarag
A: 

The ultimate language is DNA. You can do pretty much anything in DNA, it just takes a while. This is unsurprising, since any language that is designed to do anything is bound to have very poor Huffman coding for any particular task.

intuited
I think in the question 'for humans' was implicit/assumed, otherwise the answer could just be machine code.
CiscoIPPhone
You can code humans in DNA.
intuited
You mean this? http://en.wikipedia.org/wiki/Windows_DNA :)
Tom
@Tom: Wow, there really is nothing that Microsoft can't appropriate.
intuited
A: 

There is only one programming language, it's just extremely modular and the toolset is fractured to take advantage of the modularity. And most programmers are only good with one or two modules.

tloflin
+1  A: 

PEBCAK: Most of the times, it's the programmers' fault. Generally, any syntax can be easily interfaced and modelled to follow the programmer's requirements. The problem is the programmer, who doesn't even know his own requirements! If he would understand them from the beginning, he could model the syntax into a nice interface, which would become his own programming language.

Tom
A: 

You have the perfect programming language, many of them actualy:

English
Portuguese
French
German
(...)

You can program anything (meaning people) quite well with them. The problem is that only humans understand it. Well ALICE also understands it, a little bit at least.

fmsf
A: 

Because programming and programming languages are domain-oriented. Just as society.

A: 

The main part of a programming language is its syntax

I don't think so. The syntax should be independent.

I know, you said "programming language", and language = syntax, but let's face it - language SUCKS. I think thoughts with my BRAIN. It produces thoughts. When I think of something it does not contain words. So I'm going to completely ignore the literal meaning of your questions and substitute my own meaning - "How do we get computers to do what we want?".

And, last time I checked computers don't think in words either. And to cover multiple grounds here, there are different cultures of computers who think completely differently.

The best programming language I could imagine would be something that converts our thoughts into something the computers understand. Since the computers could speak in different languages we'll need something that's machine independent. Something that would precisely define our thoughts in terms of stuff that we would want to see on our computers. This set of concepts is not stored as words in a language, so it is also language independent.

I wonder which we will solve first. Math or computer science? I'd enjoy both equally.

A: 

There was some trials before to put together all good feature of several languages. I'm thinking of Perl.

I'm thinking of Perl that combines features and syntaxes of C, shell, specialized regex. It has dynamic typing like Lisp, defines an underlying virtual machine, is quite efficient at low-level operations (you can even include inline assembly code) and some others features borrowed here or there. When it was born in the 1980's it could seriously be thought as a kind of ultimate language and the result is definitely interesting, but also definitely not ultimate.

Now where did it fail? Not that it really failed, but why did it not get a larger market share by today? My advice on the subject is that a large part of Perl ecological-niche was taken away by Python, Java and C++. I believe that is because Perl missed the OO paradigm. You can do OO Programming using Perl, but it's still awkward, because it was not thought inside the language at first.

Now, it's probably interresting. I believe every language's syntax is basically the expression of some underlying idea (paradigm). You start from different ideas and you get different languages. When ideas evolve you get new languages. If underlying ideas are good or at least if many people support them you get a successful language (not necessarily a good language, but a successful one, I'm thinking for instance of PHP or of Visual Basic).

Now after structured programming, functional programming, Object Oriented programming what'll be the next big new paradigm? I would bet on some paradigm that would make easy to extract parallelism from current processor architectures like using good old continuation passing style in some parallel language instead of current linear flow stack based languages? Because even if threads and events are around today, they are merely seen as extensions, not built in the language (well, OK, there is Erlang it may be to parallel programming what Smalltalk was to OO Programming).

What is sure is that we did not yet come to the last underlying idea for programming language (and I hope we won't ever) and then there will still be other languages born in the years to come. Maybe at some time some merging process will occur between all these ideas and we'll get some "ultimate language" with the meaning that others where left on the side of the road like Algol, Pascal, Modula or Ada (well some of those are still moving, or the corpse is still warm, but anyway...). But really I still hope it won't happen and we programmers will keep going and continue having new ideas.

kriss
+1  A: 

A programming language that frees me from the burden of clarifying my ideas.


But I've made $13.72 already today!  Ow, stop throwing pennies.

Mark Tomlin
+1  A: 

Desinging programming languages is mostly about making compromises. Can it be blazing fast like C, yet allow weak typing like python? The more "forgiving" your programming language become, the higher level it gets and the slower it is.

Can you imagine a vehile as strong as a buldozer but as fast as a ferrari?

Eric
Sure, but that vehicle would get about 1 mile per gallon of gas.
Loadmaster
+1  A: 

It is because god already blessed us with these big brains and nice salaries. Why make it easy on the stupid people? We have all maintained code and looked at code done by people who are "experts" or very good at their jobs. Now, we all have dealt with buggy code from these experts. Now, imagine if any joey smith off the street can pick up a programming language and start "developing." would you like to maintain that code? I think not!

Tom