Why do they keep making new languages

https://lemmy.stonansh.org/post/14522

Why do they keep making new languages - STONANSH

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.

Why invent the screwdriver if you have a hammer
What kind of screwdriver though? Torx are superior.
Robertson would like a word.

No doubt they are probably better overall, especially when considering manufacturing. But I swear parts of my house where built with scraps (or the last guy was just a sociopath) and most of the time I encounter them it’s in some rare ass instance and it just pisses me off.

Last time was when servicing my AC I noticed the breaker was bad (ie wouldn’t reset ). So I had to swap it and by code I needed to swap the box it ran on since it was showing signs. Sure enough 1 of 4 screws holding it to the side of the house is a fuckin Robertson head. So I was neck deep in fixing shit and had to stop and go find my random cup of bit heads out in the shop.

Now I just carry a bit if I can remember it. But it’s hard to find screws sometimes so I just don’t use it to avoid exacerbating my own problems.

“I just use my teef.” --Assembly Programmer
In a lot of cases it feels a lot more like my mother in law buying me a new multi-tool every Christmas
Long has man wanted to experiment with as many partners as he can.

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.

Such an abomination could be created. Just imagine all the over engineering that would be required.

It would run on ANY platform by embedding every libc and VM and other exotic runtime environment.

It runs on EVERY platform and thus it can be adequately tested on NO platform.

Also, by the time you’ve gotten it to compile, another two versions have come out.
There are no stable releases, just a continual rolling build from the single bespoke server farm that can create releases

easily improve … C++

I assure you that there is absolutely nothing easy about the C++ standardization process, lol.

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.

Hang on a minute. Isn’t that literally just Rust CrabLang?

Rust still lacks OOP (the inheritance/subtyping part of it) though. And some more advanced Haskell features too, like HKT.
I’ll take your word for it about the missing Haskell features, but with regards to inheritance, they deliberate chose to avoid it. They use an alternative model to achieve the same goals inheritance is meant for, but without the issues that come along with it. Their approach is basically a more advanced version of how Go uses interfaces to define shared behaviour.
Ooh rust just became more appealing to me.

It is pretty neat. They’ve made a lot of really interesting design decisions that make for a pretty unique language.

One of its main selling points is how it guarantees memory safety without using a garbage collector. That, plus the fact that it does a shit-ton of compile-time optimizations, actually makes it pretty fast. Like, 80%-90% as fast as C (which is much faster than all the other high-level languages like Java, Go, etc, partly because they do in fact use garbage collectors).

If you want to check it out, I recommend this playlist as a solid intro.

The Rust Lang Book

YouTube

Oh yeah, I get all of those, because I am a Rust programmer myself who hates OOP. :D

I raised the topic up only because of how people were talking about “the ultimate language with everything”.

I’d call it Paradox Lang, or PL for short. It even has features that are contradictory to each other, you just have to declare which mode you want at the top of every file. Can you imagine. :)

Some languages have a obligation to support older versions, provide upgrade guides. They have old baggage in the forms of old systems or processes that they can’t just abandon.

Sometimes it’s easier to just start over from a clean slate. Experimenting and seeing how it works. If it fails well you haven’t inconvenienced millions of users.

It’s all about experimenting, trying to see what works, what it’s good with and what it’s not good with. A language like Java can’t just change to experiment things. Some people are also fixed to the style and methodology that Java provides.

Aside from that, hobby languages are just hobbyist stuff.

Quite a few languages that are major players now started as hobby languages.

PHP was thrown together as a side project by a Canadian in '93 for his own homepage, and released on Usenet. It grew out of control.

Now it’s like the Russian language of the internet–every programmer speaks it, but we all aggressively pretend not to.

And with good reason! But that don’t change that we know it.

I think PHP has a bad rep 'cos it tried to be everything to everyone… if you maintain a certain standard (i.e. always do the same thing the same way) and avoid deviating it’s actually a pretty cool language.
Personally I love it because it runs on everything.

There is a time when you are solving/coding for a specific domain and you quickly start metaprogramming (coding a code generator). That’s the moment when you write your own Domain Specific Language. They have a tendency to grow and evolve. In time some of them become full blown programming languages themselves.

My suggestion, learn a few from different paradigms. They are more than eye opening.

you would think there would be some kind of universal language

There is an xkcd for everything
You got to it before I did. Programming languages are like vehicles. You wouldn’t take a sports car off-roading, and you wouldn’t expect a tractor to win a drag race. There is a lot you can do with an all-purpose vehicle, but it’s not going to be as good as something that is purpose-built for a single task.
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.
And then there was python. Designed to be designed.
If there was a single language, afterwards the same broken logic would be applied to frameworks and libraries, and we all know how many people bitch and whine over Java and it’s extensive standard library.
JavaScript (is the universal language) (is also the answer of why there are so many languages)
The same reason anyone creates a new product in an existing market - they want money.

For which language do you have to pay the language inventor to use it?

  • That sentence may be grammatically … questionable …, but I don’t know how to write that correctly now.
Coldfusion (Adobe) comes to mind. There is an open source CFML version or two, but the real deal is a bit pricey. It's mostly used by government, higher ed., and healthcare. It's not terrible, but it was cooler when it was younger IMO.
If you invent a language and it takes off, you’re literally the expert on it and will reap the financial windfall of that.

That sentence seems correct. As for your question, you’d rather have to ask yourself: When would you pay for a programming language?

Back in the old days before internet and commodity hardware, before easy distribution, before non-trivial software, before basic compiler knowledge was common people were easily impressed, so naturally you could sell your compiler for primitive grug BASIC.

Today, that situation is different. A language by itself is meaningless, a risk, even, in some ways. A while back some developer of REM Objects was bitching about in the old aggregator on how nobody wanted to spend money on their special proprietary BASIC. Like it was just another product. They don’t know how to use a computer how programming languages work. This extends to even finding users willing to use your stuff for free. I don’t want to knock on REM Objects in particular, you know you could add way more examples like Seed7, every lisper ever etc., but let’s get into why people pay for programming languages.

  • extreme vendor lock-in of platform, hardware, whatever (but you almost always have your language bundled with something else in the first place, because…)
  • the point is a feature beyond the language (think matlab, labview, SAP, Excel or Coldfusion 8bitguy mentioned)
  • dubious support contracts (think Oracle JDK)
  • enthusiasts you can milk for life support and dumbfucks that fall for your next gen graph AI DSL whatever bla
  • extremely great developer experience (but we live in an age where megacorps create languages and infrastructure for improved experience for free, so, good luck with that these days)

I’ll bite the bullet: I’m making my own scripting language for fun, as a learning experience and a tool for my own projects. If it can help others, great! But that’s not my main goal.

In nearly 5 years working on it, I’ve made at most 400$ from donations and grants. Open source isn’t a viable source of income, no matter what ; and programming language dev is even less profitable.

let hem keep at it. I haven’t found an easy and verstile language as Python than can compile to byte code and be as fast a C ! I know it is coming anytime now despite having been waiting for over a decade.

I won't claim it's as easy as Python, but that's the rough area that Nim is aiming for. Going from dynamically typed to statically typed is always going to be kind of painful, but I've liked the language overall.

Also, we have a Nim community here, if anyone is interested: https://programming.dev/c/nim

Nim Programming Language

The Nim programming language is a concise, fast programming language that compiles to C, C++ and JavaScript.

Nim Programming Language
I’m not sure it can really be as fast as C in general.

We should make one programming language to rule them all!

imgs.xkcd.com/comics/standards_2x.png

A given programming language often has limitations which are largely different than the limitations from others. This means that different languages are often used on different kinds of problems. Want something fast, use C. Want to write something quickly, use python. Want it to run on just about anything, use Java. And so on.

So why don’t we make one ultimate one or a few that fulfill all needs? Well, partially because we haven’t figured out how to do that, but also it’s really easy to learn yet another language once your understand how they work. I can write in python, js, c, c++, c#, Java, kotlin, rust, perl, ruby, php, forth, lisp, and I could keep on going for quite a while. The underlying concepts are largely the same and so picking up a new language is no big deal (though being good at it is a bigger deal). We have so many because ultimately it just doesn’t really matter that we have so many.

No idea, HolyC is the only language we need.
HolyC and Brainfuck are for noobs, I only use Whitespace
Whitespace (programming language) - Wikipedia

For various reasons.

Different languages take different approaches and models to do stuff. Thus making each one better or worse for different challenges.

For example, python is easy and quick to get up and running. Bug it’s slow and unsuited for low level programming (like OSes, drivers, and embedded stuff). On the other hand, C is very fast and very low level, allowing you to make both high performance programs and low level stuff, but it’s a nightmare to use and you will run into all sorts of problems that an easier language, like python would avoid. All of this is mostly due to python being interpreted (instead of compiled) and c having manual memory management.

But they might also take a different approach at computation, like for functional languages (opposed to imperative languages) which try to solve problems in a more “mathematical” and declarative way, instead of defining a sequence of instructions. Or, even more, logic programming languages, in which you define a series of logical statements and the language tries to find solution and draw conclusions from them.

And some languages are designed around some particular concept that they think is beneficial and worth exploring, maybe taken from various other languages and put together, like rust which is designed around the RAII design pattern and takes large inspiration from functional languages, while still being and imperative procedural language (like C, so not object oriented). Or java which was designed to be a portanle but performante object oriented language, with support for low powered embedded system, full of features but simpler than c++, etc… all stuff that now is nothing special, but remember that java us very old. Or kotlin which tries to be java (they are interoperable), but modern and better and more “pure” or “consistent”. Or c++ that started as an object oriented superset of c, but then started adding every single feature of every other imperative language, and never giving up on older stuff, to the point of becoming very hard to use correctly while making it very easy to screw yourself in the most intricate ways.

And of course there are domain specific languages (opposed to general purpose languages). Which aren’t even necessarily Turing complete. They are designed for one purpose only, and they do that better than general purpose languages. For example AWK for text processing, or SQL for databases, or matlab for scientific calculations, or TeX for typesetting, or GLSL for shaders, or coq for theorem proving. And here imagination truly is the limit.

So, the point is, every language is more suited then other for some kind of work. And when people stumble across some problem that is hard to tackle and come up with some approach to solve it, or when they grow fed up with the issues of some older languages, they often like to make a new language around that. And some times this leads to entirely new paradigms which are worth exploring.

P.s.: I like languages:)

How do you know which language to use? And how do you know if you should stick to a language that you already know or if you should learn a new one?

Sorry if this is a dumb question I only just finished my first year of being a comp sci major

Generally the most supported language on the tool/platform you want to target is the best one. Like SQL on databases, JS/ES in browsers, python in data science related stuff, etc. If multiple are heavily supported then just pick the one that’s the most comfortable.

It’s not a dumb question. The answer is “it depends”, it’s mostly a choice. The general rule is that when yo start a project, you choose the language that you think will help you the most, whether that is because you already know the language, or because you have to work with stuff that already use that language, or because the language is better at doing that.

Regarding whether to stick to a language or learn a new one, in general your CS teachers will tell you (and they are correct) that you should not “learn to program in a language” but just “learn to program” and then apply that knowledge to whatever language you need. So, you should always learn languages that are different from the ones you already know in order to learn new paradigms, and then when you need a specific language, just learn the details about it. BUT, even if this way you will be able to use most languages, you will not be “good” at most, so you should also have some languages that you know really well and are experienced in. And for that you should choose the ones that are more useful to you (or maybe useful for your job) or the ones that you like.

Especially if one of them is based off the other.

Rust is based off of C/C++
Ruby is based off of Perl, Smalltalk, Eiffel, Ada, BASIC, Java, and Lisp

Just a couple of examples. Quite frankly, it's dependent on what system, what infrastructure .etc that'll be the call for a specific programming language. Nothing wrong with just picking one or two and sticking to them.

And I think that's what a lot of beginners in wanting to study programming languages can fall into, they want to be the jack of all trades in programming. But there's this problem of a new language coming in all of the time and it can get very wiry trying to remember them all.

That’s why everyone actually codes in lisp.
Not enough parentheses in your reply.

Why are there so many different stores? You have grocery stores and hardware stores and computer stores and bulk stores and electronics stores and fire work stores, there’s even fast food businesses and strip clubs.

You can buy most of this as Walmart, so why isn’t there just a universal store?

What might compel someone to make their own language? Typically, it’s because they’ve already used some languages, they have some criticisms of it, and they want to make something better. Now, for languages that are open source and accept community contributions, that is an option. However, keep in mind that each language already has its own core maintainer(s), with their own vision, as well as a whole host of other people who would have to be convinced that your idea (whatever improvements you want to make) are a good fit for that language. Some changes can be quite drastic — especially if you want to improve one language by bringing in insights you’ve gained from another. So sometimes (not often, but sometimes), people say “fuck it, I’m making my own language, with blackjack and hookers”.

The thing about software is, it’s really easy to play around with. You don’t need a workshop or parts or anything — you just need your computer. As a result, you have lots of people tinkering with stuff like making their own programming language, whether just for fun or more tangible reasons.

And we’ve been in this cycle of innovation for decades, and it’s how we’ve gone from punch cards to assembly to C, Python, and all the rest.

But surely we don’t need any more innovation? Like, why can’t we all just use one language for everything?

Well, it’s true that nowadays we have a whole bunch of general-purpose, multi-paradigm languages. The analogy people like to make is “different tools in your toolbox”. But, to clarify, it’s not that some of them are hammers and others are screwdrivers; they’re all the same kind of tool (“programming language”), so really it’s more like different screwdrivers, of varying sizes, with differently shaped bits at the end.

With screwdrivers it’s clear why you might need one with this shape or the other: Otherwise it won’t match the screw. With languages it’s a little more subtle. You see, when you design a language (or almost anything else, ever), you inevitably make a series of tradeoffs. Is the language compiled or interpreted? Does it have a garbage collector? Does it have a strict type system? How does it do async? Does it support higher-order functions? There’s a million questions, and you’re going to get a different combination of answers for each language you look at. And that’s before you evaluate other (potentially very important) things, like “is this language fast enough for my use case?”, or “I need a library for such-and-such, has someone made that in this language?”, or “does the language have a solid enough community that I can reliably search the answers to my questions?”.

Technically, any of the major languages — Java, Python, C, C++, C#, Javascript, Go, Rust, etc etc — can be used as a one-size-fits-all, universal programming language. There’s actually a joke “law” that goes “anything that can be written in Javascript, will eventually be written in Javascript”. But they each have their own unique combination of design decisions, so in practice different ones will be easier to use for this kind of project or that (one major factor is third-party libraries, like python’s numpy or pandas, that may not have equivalents in other languages). There are also situations where, for a given platform, you have to use that language. For example, for Microsoft’s .NET stuff, I don’t think you can substitute C# for something like C++ (someone correct me if I’m wrong please). Or, if you’re working on the Linux kernel, you’re pretty much just using C (I think they were considering adopting Rust, but idk if that’s still going on). And, of course, the dominant programming language for anything on the internet is Javascript (although WebAssembly has made huge strides in roughly the past decade, so you can actually use other languages as long as they can compile to WebAssembly).

Finally, to wrap up this already way-too-long comment: a lot of these languages are very similar to one another. They’re all procedural, heavily inspired by C, and for the most part they’re either compiled and statically typed, or they’re interpreted and dynamically typed. There are also a whole bunch of other languages, called functional languages, that are designed based on entirely different principles (the principles aren’t harder to learn than what you’re having to learn for Java, they’re just different). But if you are looking for a universal programming language, I think the closest you’re going to get is either C, C++, Python, or Javascript. In addition to Java, I would strongly recommend you learn C and Python (C has a bit more of a learning curve, but it teaches you a lot about memory management, which is a lesson you’ll carry with you to any other language).

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

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.

Relevant XKCD: https://xkcd.com/927/
Standards

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