The Best Programming Language Ever

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.

There’s a whole wide world out there beyond 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.

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.

.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.

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. :wink:

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

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.

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.

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.

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.

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?

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 under D

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.

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

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

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.

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?

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 :frowning:
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).

Because they’re good people?

Hahaha. It’s funny because it’s true :’(

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.

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

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.

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, 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.

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)