Reply to post:

Microsoft points PowerShell at Penguinistas

h4rm0ny

>>"Huh? So OO languages aren't worthwhile on Linux?"

No, that's an entirely separate thing (and obviously they are). The thing I alluded to is that Windows is itself structured in an OO manner. There's practically nothing in it that isn't exposed as an object. GNU/Linux is very different - it's primarily text oriented. Piles of configuration files in text format, the standard tools all work via text. Etc. One of the great things about Powershell is that it has Object Pipelining. So the output of the DIR command isn't a textual list of files and directories, but an array of file objects. Of course they convert automatically to text if you output them to screen, but you can pipe them to other applications as objects which is hugely useful. The output of the ls command in GNU/Linux is text, however. If you wanted to extract, for example, a list of file sizes, you do it by knowing where in the output the bytes column is and ripping it out with awk or equivalent. Similarly, you can configure any parts of Windows as objects. For example, file permissions are actually part of the ACL model which you can query and modify as objects.

So the hugely useful object pipelining of Powershell is largely wasted in a GNU/Linux environment. That's what I was saying. It's nothing to do with OO languages not running or being useful on GNU/Linux, but that the environment itself isn't OO.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019