With Bash you get a wealth of tools because everything can handle text.
With Bash you get a wealth of tools because everything can handle text.
If there's anything wrong with the article (for one thing, it's 4 yo), please point it out. I just brought this up because the IronPython part of .NET is usually forgotten, though still there and has some interesting uses.
[0] http://www.pythondiary.com/blog/Jun.26,2012/ironpython-and-m...
The part about the .NET objects has already been addressed by others, and I actually like that -- right now at work we're wrestling with a few command line applications that output text (in full UNIX-style) and it's a mess to parse the thing, because it's so badly documented. If we had objects as a result it'd be glorious (not that PS would help, this isn't a bash script we're working with/against).
Sure, it doesn't work with CPython. I shouldn't need to be that explicit though, bring up IronPython is one hell of a nit.
... and all those tools work seamlessly in Powershell, too. .NET objects are passed around within Powershell, but traditional dumb text is used for out-of-proc stuff. Where is the "fatal flaw?"
I don't understand where the perceived downside is - you wish Powershell was implemented in Python, not .NET?
The fatal flaw is that I have to distinguish between "within Powershell" and "out-of-proc". I simply don't have this issue with plain text; I don't know or care what language/runtime the programs I use are written in/for because they all use the same interface.
$obj = [PSCustomObject]@{ Number = [long]2 }
$obj | ConvertTo-Json
The lack of decent types, is surely a weakness of js?
1311768465173141112
PS C:\> 0x1234567812345678 >.\foo.txt ; cat .\foo.txt
1311768465173141112
PS C:\> "WScript.Echo('$(0x1234567812345678)')" >.\foo.js ; cat .\foo.js ; cscript //nologo .\foo.js
WScript.Echo(1311768465173141112)
1.31176846517314E+18
...
I'm not seeing your point.
JavaScript does not have 64-bit integers. So if you exported an object with 64-bit integers to XML, for example, a JavaScript program could not (correctly) deserialize that XML.
I think technically it should be no problem to write some package for most programming languages for interopting with .net objects. In this sense about everything could also handle .net objects.
And no autocomplete.
$dir = gci
$dir.<tab> -> $dir.CountSo can bash. How is this different from bash's autocompletion?
> also ... object properties
Well, there aren't objects in bash, so I can't translate this.