# The Best Programming Language Ever

**URL:** <https://boards.straightdope.com/t/the-best-programming-language-ever/514212>\
**Category:** In My Humble Opinion\
**Created:** [October 18, 2009, 11:16am UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212 "2009-10-18T11:16:41Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [October 18, 2009, 4:13pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/21 "2009-10-18T16:13:21Z")

</div>

When I was learning it was OOP C++

My current favourite thing to use (but only because my current work is very web-centric) is PHP.

I also use ASP but it aint as pleasant as PHP.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [October 18, 2009, 5:46pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/22 "2009-10-18T17:46:22Z")

</div>

> [@chromaticity](#):
>
> I hate perl because it looks so ugly, good for quick hacks, but not easily maintained.

There’s a whole wide world out there beyond [JAPH](http://en.wikipedia.org/wiki/JAPH) contests, ya know. I’ve long since retired from arguing with people about the maintainability of properly written Perl code, though, so I’ll just say:

I also really like Javascript. It has a bad reputation as the language for idiotic browser hacks, but it’s a lean, well-designed, high-level prototype-based OO language. If only there were a standard IO library, I’d use it for all sorts of non-browser tasks.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [October 18, 2009, 6:07pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/23 "2009-10-18T18:07:25Z")

</div>

I have no idea what the “best” language is. I write in C and 8051 assembly. I really, really like RealBasic for rapid prototyping and quick one-off apps. I can make a working cross-platform App in a few minutes with it.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [October 18, 2009, 7:13pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/24 "2009-10-18T19:13:33Z")

</div>

> [@Waffle\_Decider](#):
>
> … Java/C# are nice for some stuff. For example, I think C# is great for simple GUI programming on Windows. However, I also dislike the fact that these programs typically need to be run through a virtual machine. I think this makes the programs consume much more system resources than they need to be. I can see why Sun originally decided to go the byte-code route: They have products for machines with different architectures, and they envisioned Java programs to be something that is write-once, run everywhere. Good for them. But why on earth did Microsoft do the same thing when they designed the .net framework? I think they should have designed them to be directly compiled into native binaries instead. …

.Net is NOT run in a VM. It runs as native code on the silicon.

.Net DOES have two-stage compilation, where the dev environment compiles to so-called MSIL which is delivered to the target computer as assembly files labeled .exe or .dll. And yes, MSIL is a machine language for a fictituous machine.

At run time those are compiled, once, into straight machine language for the local hardware & then executed by the hardware. Yes, there is the CLR “runtime”, but that’s much more a super-duper API library. It definitely is not anything like a byte code interpreter or VM.

---

<div class="post-metadata">

**Author:** ![Stealth\_Potato](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stealth\_Potato](https://boards.straightdope.com/u/Stealth_Potato)\
**Post date:** [October 18, 2009, 7:33pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/25 "2009-10-18T19:33:03Z")

</div>

My favorite language would have to be C++.

I will not by any means try to say that it’s the _best_ with respect to any metric involving ease of use (that would be Python), conceptual coherency (also Python), or productivity (Python again), but damnit, I love me some C++. Really I suppose it would be a love-hate relationship: It has caused me more pain than probably any other language, but that has a lot to do with the fact that I’ve just been using it for so long. And with those years of pain and perseverance I just couldn’t help but develop a sort of respect for the language, with all its expansive complexity and bizarre idiosyncrasies.

But once you get past the complexity and feature depth (at least one person has described C++ as the result of Bjarne Stroustrup bolting everything he’s ever heard of onto C; another described it as an octopus made by nailing extra legs onto a dog), there really is a lot to respect in terms of sheer flexibility. It supports a huge range of abstractions while still running close to the metal; in particular its template system is incredibly powerful, if you know how to use it.

Of course, the price you pay for keeping those abstractions close to the metal comes in the form of wide swaths of undefined behavior that you alone are responsible for avoiding. Forget to explicitly define a virtual destructor for a polymorphic base class whose subclass instances ever have operator delete invoked? Or use _and_ modify a variable’s value between sequence points? Or maybe just write past the end of an array? Congratulations! It is legal according to the C++ standard for the compiler to translate your code into an executable program that causes your computer to collapse into a black hole. Or just wipes your hard drive. Or goes on the internet and downloads copious quantities of goat porn. The C++ standard is not picky. 😉

> [@Superfluous\_Parentheses](#):
>
> Javascript - whoever thought that the Constructor mechanism was better than just extending from a prototype? Lots and lots of confused design in a language that’s actually conceptually simple and flexible.

I concur. I love JavaScript, but some aspects of its design are annoyingly obtuse. See also: horrifying features like the “with” keyword.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [October 18, 2009, 7:53pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/26 "2009-10-18T19:53:11Z")

</div>

Personally, I vote for D for all the reasons that everyone else likes C++ but minus all the reasons that people don’t like C++. You have full access to all C libraries ever written, you can do systems programming, it doesn’t block you from doing anything at all–for instance it has nearly full support for everything you could do with a preprocessor but built in to the language in a clean way–it compiles out fast (to a straight EXE), has full garbage collection, and it has the best exception handling of any language I’ve seen plus all the features you could ever want for defensive coding.

---

<div class="post-metadata">

**Author:** ![suranyi](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@suranyi](https://boards.straightdope.com/u/suranyi)\
**Post date:** [October 18, 2009, 8:03pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/27 "2009-10-18T20:03:12Z")

</div>

> [@Waffle\_Decider](#):
>
> I love C++. It is very expressive, and modern compilers can generate extremely efficient code from it.
> 
> It does have a lot of disadvantages, however. It gives you a lot of rope to screw yourself over with if you don’t know what you’re doing. And chances are, at least some of your fellow cow-orkers indeed do not know what they’re doing, and you’ll need to clean up their mess.
> 
> There are aspects of its syntax inherited from C that could be done better. For example, seriously, the syntax for pointers and functions declaration, WTF? Also, the need to maintain declarations in separate header files can be cumbersome at times.
> 
> You’re going to need very decent compilers with a lot of optimizations in order to get any reasonable code out of modern C++. This is not a problem nowadays on most common operating systems for normal computers. This is, however, a problem for many smaller embedded environments. Many of them don’t even have _any_ C++ compilers, never mind a good optimizing one.
> 
> Java/C# are nice for some stuff. For example, I think C# is great for simple GUI programming on Windows. However, I also dislike the fact that these programs typically need to be run through a virtual machine. I think this makes the programs consume much more system resources than they need to be. I can see why Sun originally decided to go the byte-code route: They have products for machines with different architectures, and they envisioned Java programs to be something that is write-once, run everywhere. Good for them. But why on earth did Microsoft do the same thing when they designed the .net framework? I think they should have designed them to be directly compiled into native binaries instead.
> 
> I think Python is very nice for some scripting jobs that need to be done quick and dirty. However, I think it may not be suitable for larger systems. The lack of static type checking inevitably leads to stupid, simple programming errors that could have been caught at compile time in other languages to blow up unexpectedly at runtime.
> 
> I do low-level and embedded programming for a living.

I vote for Python. At our company we’ve used it for huge programs, many thousands of lines long. We’ve converted some of our legacy C code into Python to make it easier to maintain.

---

<div class="post-metadata">

**Author:** ![Waffle\_Decider](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@Waffle\_Decider](https://boards.straightdope.com/u/Waffle_Decider)\
**Post date:** [October 18, 2009, 8:09pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/28 "2009-10-18T20:09:07Z")

</div>

> [@LSLGuy](#):
>
> .Net is NOT run in a VM. It runs as native code on the silicon.
> 
> .Net DOES have two-stage compilation, where the dev environment compiles to so-called MSIL which is delivered to the target computer as assembly files labeled .exe or .dll. And yes, MSIL is a machine language for a fictituous machine.
> 
> At run time those are compiled, once, into straight machine language for the local hardware & then executed by the hardware. Yes, there is the CLR “runtime”, but that’s much more a super-duper API library. It definitely is not anything like a byte code interpreter or VM.

That may be true. And I’m sure most Java runtimes implement similar optimizations too. Yet my point still stands: Why bother with MSIL in the first place? It takes time and memory to translate MSIL into real machine code. This all happens on the end user’s machine, which may not be running the latest and greatest hardware. This is a neat idea if binary portability is important or if you want to run things in a sandbox, but I’m not sure if this is really necessary to achieve many of the objectives of the .net framework.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [October 18, 2009, 9:10pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/29 "2009-10-18T21:10:07Z")

</div>

CIL is pretty high-level, so writing backends for compilers is pretty easy, compared to Java bytecode, and “real” assembly (dynamic languages targeting the JVM are notoriously hard to implement).

It also makes .Net programs somewhat platform agnostic: they can run on Linux, for instance, using Mono.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [October 18, 2009, 9:11pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/30 "2009-10-18T21:11:27Z")

</div>

> [@Stealth\_Potato](#):
>
> My favorite language would have to be C++.
> 
> I will not by any means try to say that it’s the _best_ with respect to any metric involving ease of use (that would be Python), conceptual coherency (also Python), or productivity (Python again), but damnit, I love me some C++.

I don’t see how Python is more coherent than e.g. Scheme. Everything’s a list, your program is the AST; how is Python conceptually more coherent than that?

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [October 18, 2009, 9:45pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/31 "2009-10-18T21:45:54Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> It also makes .Net programs somewhat platform agnostic: they can run on Linux, for instance, using Mono.

There are plenty of multiplatform windowing libraries. You can use the SDL for gaming and SWT,\* GTK, or Tk for more standard windowing applications. And of course most applications don’t even have a user interface, and the standard library handles everything else you could ever need.

- Called [DWT](http://www.dsource.org/projects/dwt) under D

---

<div class="post-metadata">

**Author:** ![Stealth\_Potato](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stealth\_Potato](https://boards.straightdope.com/u/Stealth_Potato)\
**Post date:** [October 18, 2009, 9:53pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/32 "2009-10-18T21:53:47Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> I don’t see how Python is more coherent than e.g. Scheme. Everything’s a list, your program is the AST; how is Python conceptually more coherent than that?

Well, I was thinking mainly of a more prosaic form of coherency within the domain of syntactically complex languages, considering Python’s high-level philosophical focus on orthogonality and “one right way to do it.” You’re absolutely right: it’s hard to beat a Lisp dialect for simplicity and consistency of concept.

> [@Sage\_Rat](#):
>
> Personally, I vote for D for all the reasons that everyone else likes C++ but minus all the reasons that people don’t like C++.

Ah, but you see, my reasons for liking C++ are the same reasons that I don’t like C++. It’s a complicated relationship. 😃

(In seriousness, though, D _is_ pretty cool.)

---

<div class="post-metadata">

**Author:** ![Squink](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Squink](https://boards.straightdope.com/u/Squink)\
**Post date:** [October 18, 2009, 9:55pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/33 "2009-10-18T21:55:49Z")

</div>

> [@Nancarrow](#):
>
> Well? What is it?

MC68K assembly language. So many addressing modes, so many instructions, so blazingly _fast_! It beat the holy heck out of stodgy old 6502 or 8086.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [October 18, 2009, 10:02pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/34 "2009-10-18T22:02:52Z")

</div>

> [@Sage\_Rat](#):
>
> There are plenty of multiplatform windowing libraries. You can use the SDL for gaming and SWT,\* GTK, or Tk for more standard windowing applications. And of course most applications don’t even have a user interface, and the standard library handles everything else you could ever need.
> 
> - Called [DWT](http://www.dsource.org/projects/dwt) under D

None of that changes what I said, though. How do you make calling a function written in O’Caml, compiled on Linux, from a C# program compiled on Windows, easy, without something like the CIL and its Common Type System?

---

<div class="post-metadata">

**Author:** ![Alex\_Dubinsky](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Dubinsky](https://boards.straightdope.com/u/Alex_Dubinsky)\
**Post date:** [October 18, 2009, 10:08pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/35 "2009-10-18T22:08:24Z")

</div>

Boo.

It is a Python derivative for .NET. It is a full superset of C#, plus adds some very cutting-edge features like its own conception of metaprogramming. Its syntax is a dream. It just needs a good visual studio plugin ☹  
I have a love-hate relationship with C#/WPF. On the one hand, what WPF tries to do is brilliant. Eg, the nesting of controls. On the other hand, it is bloated, it broke intellisense, xaml is garbage (because of xml), and it’s just poorly worked out. It was a product of the Vista Era, and .NET 4.0 doesn’t do anything to rectify it.  
Random pet-peeve: embedded programmers who use C. You idiots, switch to C++ even if you’re not gonna use true OOP! Tho frankly, I wish I could do embedded in C#/Boo (even if i’m not gonna use managed memory).

> [@](#):
>
> I can see why Sun originally decided to go the byte-code route: They have products for machines with different architectures, and they envisioned Java programs to be something that is write-once, run everywhere. Good for them. But why on earth did Microsoft do the same thing when they designed the .net framework?

Because they’re good people?

> [@Nancarrow](#):
>
> Well it’s certainly powerful, but it relies too much on spaghetti code, and mixes up different levels of abstraction haphazardly. And they (soon to become we) _still_ haven’t brought out the definitive specification yet. No facility for comments either, unless you consider “ATATATATATATATATATATAT” repeated a few hundred times to be a comment.

Hahaha. It’s funny because it’s true 😢

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 18, 2009, 10:11pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/36 "2009-10-18T22:11:34Z")

</div>

For most of my work, I use good ol’ fashioned C, none of this object-oriented business. C can already do everything; why do you need to add anything on to it? Well, OK, it’s mostly because I never learned about object-oriented programming until I was too old and calcified to learn it.

But for what I actually _like_ best, believe it or not, it’s AWK. It’s simple and easy to use for all sorts of little command-line or shell script types of tasks, but still rich enough to do absolutely everything, if you’re masochistic enough.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [October 18, 2009, 10:13pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/37 "2009-10-18T22:13:52Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> None of that changes what I said, though. How do you make calling a function written in O’Caml, compiled on Linux, from a C# program compiled on Windows, easy, without something like the CIL and its Common Type System?

If you’ve got to do that, your system is already fracked. 😉

But the general solution is to use stdin/stdout or the command line with one app launching the other. It’s slightly slower, but if you’re using O’Caml for something speedy, you’re missing the point. And in general, if you’ve got different languages, those bits are always going to be separate programs anyways, unless one of them is C in which case you’re dealing with a standard library. Being able to directly access C functions is really the only practical necessity for any language.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [October 18, 2009, 10:21pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/38 "2009-10-18T22:21:53Z")

</div>

> [@Sage\_Rat](#):
>
> If you’ve got to do that, your system is already fracked. 😉

Well, yes, if you’re used to the C/C++/D style of working. But that was the point behind .Net: a company can now produce assemblies in F#, Boo, Visual [Basic.net](http://Basic.net), or whatever, and another can use them easily from their C# program without handing over source, or messing around with recompilation, etc.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [October 18, 2009, 10:35pm UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/39 "2009-10-18T22:35:28Z")

</div>

> [@Capt.Ridley\_s\_Shooting\_Party](#):
>
> Well, yes, if you’re used to the C/C++/D style of working. But that was the point behind .Net: a company can now produce assemblies in F#, Boo, Visual [Basic.net](http://Basic.net), or whatever, and another can use them easily from their C# program without handing over source, or messing around with recompilation, etc.

Alright, I can see that.

I don’t consider that to be of sufficiently practical value to convert, seeing as my style and area of coding is based more on creating a singular uber-program that gets the computer to stand up and sing rather than trying to be cooperative with widely disparate code bases that all have to munge together.

---

<div class="post-metadata">

**Author:** ![Alex\_Dubinsky](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Dubinsky](https://boards.straightdope.com/u/Alex_Dubinsky)\
**Post date:** [October 19, 2009, 2:03am UTC](https://boards.straightdope.com/t/the-best-programming-language-ever/514212/40 "2009-10-19T02:03:35Z")

</div>

> [@Sage\_Rat](#):
>
> If you’ve got to do that, your system is already fracked. 😉
> 
> But the general solution is to use stdin/stdout or the command line with one app launching the other. It’s slightly slower, but if you’re using O’Caml for something speedy, you’re missing the point. And in general, if you’ve got different languages, those bits are always going to be separate programs anyways, unless one of them is C in which case you’re dealing with a standard library. Being able to directly access C functions is really the only practical necessity for any language.

No, you’ve totally missed the concept of .NET and refused to google it.

You can write one part of your program in C#, a DLL in Boo, and another DLL in an O’Caml derivative. These DLL’s can be compiled on different machines by different developers who prefer these languages. Or inside a single VS window by one developer because they’re the right languages for the job (considering Boo doesn’t work with WPF yet and considering O’Caml shouldn’t be used for most things).

And it all just works. No fracking. No munging. And no godforsaken stdin/out. It’s the biggest godsend to alternative language creators and users since… ever.

(Interesting thing you may not have known either: Microsoft invented a new way to do command-line interfaces where the data returned and sent to command is not text on stdout/in, but entire fracking objects. Objects full of structured data. Objects that can be formatted as text if you want to. Objects that can be interpreted and manipulated in a way that is not AWKward. And yeah, it also uses .NET)

[Previous page](https://boards.straightdope.com/t/the-best-programming-language-ever/514212.md?page=1)

[Next page](https://boards.straightdope.com/t/the-best-programming-language-ever/514212.md?page=3)
