Hacker News new | ask | show | jobs
by majkinetor 1891 days ago
No, I said what I mean. Bash and its disasters like [ as executable and mega error prone and awkward language designed 50 years ago IS horror.

Verbosity of powershell is optional, I don't use it.

> consistency that comes with all Microsoft designed products.

Oh, lets not troll here.

2 comments

Disasters like powershell returning a 0 exit code even if there is an error? Its a pile of trash that doesn't add anything new other than a big shiny MS logo.
That is simply not true. RTFM - $ErrorLevel is for native apps $? is for cmdlets
> its disasters like [ as executable

Why is that a disaster? What problem has it caused you that wouldn't have happened if it wasn't an executable?

[[ is a non-executable version of [. Does that solve your problem?

I don't have a problem - I don't use bash unless its few lines or absolute must.

Its disaster because launching process to achieve simple math expression is just ridiculous, besides being slow and besides having to terminate it with ;. Its wrong on so many levels I don't even know where to start, they must have been smoking some nasty things back in time.

> launching process to achieve simple math expression is just ridiculous

That's why you don't do that. $(( math goes here ))

That is also ridiculous as it starts subshell/subprocess.
Neither [ nor $(()) start subshells/subprocesses. [ is built-in in pretty much every shell, and there's absolutely no reason for any shell to make a subshell/subprocess for $(()). You might be confusing it with $().

In any case, worrying about subprocesses and their slowness in a shell is completely moot. Shells aren't built to run fast, and are rather built to work with executables conveniently.

> besides having to terminate it with ;

Is that really a complaint? Does that bother you a lot? This seems so petty, I'm a bit lost for words.

[ is a regular command because the control structures of the shell are flexible enough to support any command for their conditions.

I don't know if you're asking for the shell to make a super-special exception in its syntax for that particular command just so that people won't have to type ; under certain circumstances, or if you're asking for control structures to be more restricted and allow only [ instead of any command for their conditions.

> they must have been smoking some nasty things back in time.

So far, you've given the impression of someone complaining that screwdrivers really suck for inserting nails. I wonder if the issue is that you've never seen hammers before or if you've never seen screws before. Or maybe the issue is you believe each tool should be equally fit for everything?

Demonstrably false.

And even if not, so what? Every argument you make is a shifting of a goalpost.