Hacker News new | past | comments | ask | show | jobs | submit login

Weeell, Unix commands also live in their own world, with their own commandset, where everything expects structured data — only the data are streams of bytes.

The problem is at the interface between these two modes of operation (and it'd be just as bad with a third mode, e.g. S-expressions or something else).

Honestly, it'd probably better for PowerShell to only deal with PowerShell commands, and Unix commands to only deal with Unix commands, with a well-defined interface between these two very different ecosystems.




Yeah, but streams of text are standard: every programming language can handle text streams. Even brainf*ck can do that. PowerShell objects are PowerShell specific.

>Honestly, it'd probably better for PowerShell to only deal with PowerShell commands, and Unix commands to only deal with Unix commands, with a well-defined interface between these two very different ecosystems.

Well, yeah, but that would make PowerShell even less useful on UNIX than it already is.


> Yeah, but streams of text are standard: every programming language can handle text streams.

What makes you think PowerShell can't handle streams of text? You'll get an array of System.String objects, one for each line, to do with as you please.

> PowerShell objects are PowerShell specific.

PowerShell objects are .NET objects living in the .NET runtime, and can be passed to any other .NET code. Yes, some object types live in the PowerShell namespace, because they expose PowerShell-specific functionality. But, for instance, `ls` returns System.IO.DirectoryInfo and System.IO.FileInfo objects, which is exactly what you would use in C# or VB.NET or managed C++ or F# to represent the same information.


It CAN, but that's not its MO.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: