Follow

Do you know how terrible of an idea it is to write shell scripts?

I will tell you.

I just spent several days rewriting several pages worth of shell scripts in .

That is how terrible shell scripting is.

It was worth that effort.

I have no intention of ever writing shell scripts again, because they are a horrible idea, and newLISP is a perfect replacement for them.

Β· Β· Web Β· 1 Β· 0 Β· 0

You might think I'm crazy for saying this.

The only reason you think this is because so many people write shell scripts and so few write newLISP.

However β€” computers are changing.

Computers are young.

We are learning from our mistakes.

And nobody will be writing shell scripts in 20 years.

A lot of people used to write BASIC.

A lot of people used to write punch cards.

And in a few years, "a lot of people used to write shell scripts".

But we grew up. Realized that it was a horrible idea. Realized the pain was simply too great. That there were better ways of doing sysadmin.

newLISP isn't even the pinnacle.

It's nowhere close.

But it is *the* best programming language for sysadmin tasks today.

Bash is not a programming language.

It is a mediocre shell.

It handles running 1-liners OK.

But it is not a programming language.

To use it as one is to be a masochist.

I feel as though someone owes me an apology for suggesting shell scripts were a good idea.

@taoeffect What is a programming language, then? I feel like for all reasonable definitions Bash should count.

@carlozancanaro Bash is not a programming language in the same way that these are not cars: jalopnik.com/5969410/ten-cars-

Bash is not a programming language in the same way that you wouldn't consider binary code to be a programming language.

What is a programming language?

Here I mean something you would want to use as a programming language, given a variety of "programming languages" to choose from.

@taoeffect I guess I just want to draw out the distinction between "being X" and "being a good X". I agree that Bash is a bad programming language, for all sorts of reasons (for example: oilshell.org/blog/2016/10/20.h).

I would rather discuss what makes a programming language good or bad, rather than saying things aren't programming languages when they clearly are.

What problems have you had with Bash?

@carlozancanaro So you consider binary code to be a programming language?

What about assembly?

At what point does something become a programming language in your mind? I'm guessing it's a similar, arbitrary cutoff.

In my mind I've permanently placed Bash into the "not a programming language" bin.

@carlozancanaro What problems have I had?

I do not (and cannot) enumerate them. They are too many and too many of them were so obscure that I was probably never able to fully identify what the problem actually was, which is a problem in of itself.

But, the highlights:

- Shell scripting isn't cross-platform (as some would have you believe). Shell scripts will break on one system and not on another.
- The syntax is insanely terrible. It is one of the worst invented. On the order of Perl/C++ bad

@carlozancanaro I take that back. I would say that its syntax is worse than Perl and C++. Even brainfuck is better in some ways because at least it's consistent.

@taoeffect It is a programming language if it can be used to express computation. This requires a definition of both syntax and semantics.

Binary code (with assigned semantics) certainly fits the bill. So does assembly. So does brainfuck and piet (dangermouse.net/esoteric/piet.). Even the lambda calculus is a programming language.

@carlozancanaro By that definition virtually everything is a programming language.

@taoeffect If you assign an appropriate semantics, sure. That then lets us discuss things like "what are sensible semantics?" and "how can we make useful programming languages?" rather than "is this a programming language?"

@carlozancanaro For the sake of avoiding semantics arguments I will try to be clearer: IMO, after using it extensively, Bash is such a terrible programming language, that I no longer consider it a programming language because I have no intention to ever write programs with it again.

@taoeffect in 20 years the Unix date rollover will have just happened. We won't be writing shell scripts because nobody will have a working shell...

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!