Let's imagine for a second that we live in a world where all programming languages are equally suited for any task. Performance, memory footprint, compile time, executable/runtime size and compatibility, and similar factors are entirely irrelevant. Valid criteria could be personal taste, perceived elegance and beauty of the language, simplicity, easiness to use, and so forth.
If any programming language could fulfill equally well the requirements for any application/system and run anywhere, which language would you like to see everything written in?
My personal choice would be Lisp. I think Lisp is beautifully simple, there are very few syntactical constructs, it's easy to extend with macros and very suitable for functional programming.
Latest comments (52)
Javascript
It's difficult if you want to include the candidates that suitable for kids' education. You certainly want to give up some deep design philosophy if it can do its job well. Without that concern, I vote for OCaml for many same reasons you stated above. I'm an advocate for FP as well. Haskell is not perfect option because of its insists on pure functional approach. OCaml, on the other hand, can be more permissive for other programming paradigms.
But why? Performance, compatibility and compile time are part of ease of use.
So in real life, Rust, because of static analysis, module ecosystem, community, and the above. I can't honestly say the syntax is bad, and some of the constructs are really good. Most importantly, the "personal taste" is achieved by me not feeling the shame of expensive abstractions while still using semantic and ergonomic abstraction.
But if laws of physics were broken, probably Haskell, since I never tried Lisp.
Because I don't want to hear that C is faster than anything else, Javascript has an npm package for anything you might ever need to do, and Java runs everywhere.
Hypothetically, if I were to create a programming language and I were designing the syntax, knowing what languages developers find elegant, simple, easy to work with and so on, would help me choose a few language's syntax to draw inspiration from. Knowing that someone prefers C because it runs fast and has a small executable size would be largely irrelevant for me.
"runs" is a bit generous, don't you think?
Frankly, at this point, JavaScript might "run" in more places.
But C beats both and I don't see how it won't continue to.
I want Rust to be Haskell(have Haskell's syntax), or Haskell to be Rust(have cargo, similar performance, similar community).
What exactly are you missing in everyday life of the syntax?
golang, rust, and elixir
Python is already such a world for data science :)
Brainfuck. Nothing else.
I would like to see Javascript abdicate its throne. But there is more work to do before that can happen, or something worse might fill the power vacuum. :-)
None, it would be awful to learn it/work with it, it would have to have a huge degree of constructs and abstract layers to be good at that many things.
But I hope it will have the Engineering productivity of Go.
But it's a hypothetical world we're talking about. Bringing in constraints and common sense from the real world makes it boring :P
In my fantasy world Go already did that :))
Plain English. So that I could write something like 1+1= and get 2, or 'calculate distance from my location to the moon' and get a sensible answer. And English just happens to be the easiest to learn and most widely used language in the world (in my humble opinion).
If my answer was restricted to programming languages I'd pick javascript. After trying some 6 languages I ended up preferring it for ease of use. Tried python, Java, c++, c#, ruby but preferred js as closest alternative to English. Easy to use and you can build an interactive GUI with it (html+css+js = web app, similar to windows forms app but works anywhere, like java).
Haven't tried lisp yet.
That's an interesting take, I hadn't considered this perspective :)
Thing is: I love programming, it is like a Lego constructor with tiny pieces, and you can build practically anything with it. It can be considered a type of art. But as a tool it should be both simple and universal, something that doesn't require special knowledge and years of training to use. English is a commonly used language, it is frequently used to give commands and as such it could be considered the most frequently used programming language. And we programmers are a button-mashing walking-talking human-machine interface that translate English into one of the programming languages! :D
It could be just me, though - I started programming because I needed a specific automation tool and my platform of choice offered a simple scripting language, which I just picked up and started hacking. And then it grew on me, but the idea that programming is just a way to get stuff done remains.