this post was submitted on 04 Aug 2023
2 points (100.0% liked)

Programming

17116 readers
201 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Why are there so many programming languages? And why are there still being so many made? I would think you would try to perfect what you have instead of making new ones all the time. I understand you need new languages sometimes like quantumcomputing or some newer tech like that. But for pc you would think there would be some kind of universal language. I'm learning java btw. I like programming languages. But was just wondering.

top 16 comments
sorted by: hot top controversial new old
[–] redcalcium@lemmy.institute 3 points 1 year ago (2 children)

you would think there would be some kind of universal language

[–] jeffhykin@lemm.ee 1 points 1 year ago

JavaScript (is the universal language) (is also the answer of why there are so many languages)

[–] Zalack@startrek.website 0 points 1 year ago

I actually don't think that's the case for languages. Most languages start out from a desire to do some specific thing better than other languages rather than do everything.

[–] Mandy@beehaw.org 2 points 1 year ago
[–] noodle@feddit.uk 1 points 1 year ago

New languages deal with challenges the old languages faced differently, with hindsight of how those languages dealt with those challenges and how they could have done things better.

We don't even have a universal language for communication. That may not be a bad thing, either. There's a theory that the language you speak changes the way you perceive the world - I believe that's true with programming as well. If we only had Java, we'd only get Java-style solutions.

[–] glad_cat@lemmy.sdf.org 1 points 1 year ago* (last edited 1 year ago)

You can't easily improve a language and stay compatible with the previous versions. C++ does it but they are crazy.

you would think there would be some kind of universal language

It does not exist, but anyone is free to try and invent it. It should be low-level like assembly and high-level like BASIC, functional, object-oriented, and have weird stuff like traits, concepts, and alien features from Haskell. It must also have both the pointers/references of C++, and the borrow checker of Rust. And don't forget to make it as secure as Ada with pre and post conditions. But it must still be easy to use. Also you will have to write a compiler for every operating system ever (mainframe, server, desktop, iOS, Android, every phone, every tablet), and contain a universal GUI that pleases everyone. It's literally impossible to do right now.

Last but not least, Java was supposed to be this universal language that you can run everywhere. It failed and it cannot be run everywhere. It also had to be improved a lot, and it's missing a fuckton of features from every other language.

[–] beeng@discuss.tchncs.de 0 points 1 year ago* (last edited 1 year ago) (1 children)

Like human languages, you get different types of expressiveness in different ways. If you know multiple languages whether is python or Java, or English and French / Spanish / German, you'll see that there are positives and negatives to each language.

Lots of people want to design the best combination of them all, using the newest tools and newest tech to create something as useful as possible.

[–] CileTheSane@kbin.social 0 points 1 year ago (1 children)
[–] beeng@discuss.tchncs.de 0 points 1 year ago (1 children)

Sort of... But new languages make use of new tech and compilers usually.

[–] Hector_McG@programming.dev 0 points 1 year ago (1 children)

And old languages add features and adapt or rewrite the compiler for new technologies. There’s no inherent advantage to a language being new.

[–] beeng@discuss.tchncs.de 0 points 1 year ago (1 children)
[–] Hector_McG@programming.dev -1 points 1 year ago

Less experience in what programmers actually want or need from a language.

[–] TheCee@programming.dev 0 points 1 year ago (1 children)

You can not perfect old languages, since there are a lot of features that you can not add on or change afterwards, OP. Not in a worthwile way. This is not a philosophical question, it wasn't for a lack of trying. And since there aren't enough skilled people in this niche, fashion driven field, expect history to repeat itself and some langs at best get 60 to 80% right.

[–] Hector_McG@programming.dev -1 points 1 year ago

You cannot perfect old languages. And you cannot write a new language without making architectural errors. And any new language that deviates significantly from what has gone before will only ever see niche success.

Thus what we have today is the best we can expect: gradual evolution of new languages, and gradual improvement of old languages. Neither has any particular advantage, but the industry as a whole keeps grasping at the eternal straw of the ‘silver bullet’ language that new languages promise.

[–] Hector_McG@programming.dev -1 points 1 year ago

Partly because sometimes a particular language suits a particular problem set.

Partly because people just like writing computer languages.

But mostly because people mistake the fundamental problem of programming, which is programming is really hard. So someone comes along and thinks “Programming is really hard, it must be a problem with the languages available” and sets out to write a computer language that makes programming easy.

But all that happens is they trade one set of difficulties for another set of difficulties. They might succeed in making writing the initial version easier, but make maintaining that code harder. Or they might solve some memory allocation problems, but create performance issues.

Either way, someone will write a language because they think they will help solve the issue of programming being hard, and fail. Because the really hard bit about programming is about understanding everything the program needs to do, in microscopic detail, and translating that into a structure that best fits the problem; not the actual coding itself.

[–] yaniv@lemmy.ml -2 points 1 year ago

We should make one programming language to rule them all!

https://imgs.xkcd.com/comics/standards_2x.png