Re:Beyond Bash: Shell scripting in a typed, OO language
by manojlds on Sunday August 16, 2015 @05:49AM
(#10068466)
That's Powershell in the Windows world.
[ Parent
| on HN ]
Re:Beyond Bash: Shell scripting in a typed, OO language
by GlennS on Sunday August 16, 2015 @07:10AM
(#10068590)
Powershell has some pitfalls of its own (I still much prefer it to Bash despite these):
1. Dynamic scoping
2. Squashing lists of size 0 to nulls and
size 1 to single elements when they come out of pipes.
3. Incomprehensible API for XML handling.
On the other hand, when a Powershell program starts getting too big, it's pretty trivial to port parts of it to one of the other .NET languages.
Re:Beyond Bash: Shell scripting in a typed, OO language
by lihaoyi on Sunday August 16, 2015 @09:40AM
(#10068871)
> 3. Incomprehensible API for XML handling.
If you think Scala has a better API for XML handling then you're in for a surprise...
Re:Beyond Bash: Shell scripting in a typed, OO language
by manojlds on Sunday August 16, 2015 @12:00PM
(#10069232)
Very true pitfalls, and there are other ones like any non-captured value anywhere in a function becomes the output of the function.
Re:Beyond Bash: Shell scripting in a typed, OO language
by bentronic on Sunday August 16, 2015 @05:52AM
(#10068469)
Powershell is exactly what bash should be (and this person wants). Their time would have better spent using and improving the pash project (open source Powershell on Mono): https://github.com/Pash-Project/Pash
Re:Beyond Bash: Shell scripting in a typed, OO language
by alloyed on Sunday August 16, 2015 @06:31AM
(#10068538)
Powershell is primarily a repl to a homogeneous .NET-based set of tools, which doesn't describe Unix very well. If you want a type-safe repl that interacts with all the handy tools written for the text-stream-only Unix world you're going to have to do some interpretation.