4 ms·
> It's fundamentally different. That's because the object pipeline is functionally analogous to function chaining within a single runtime like in Python or Rub
by integraton 11y ago
> It's fundamentally different.
That's because the object pipeline is functionally analogous to function chaining within a single runtime like in Python or Ruby, not streaming data between arbitrary executables like in Unix pipelines.
This would be a lot clearer if PowerShell advocates compared it to things that it's actually functionally analogous to, but they are trying to position it as a Unix shell competitor.
- useerup 11y ago> That's because the object pipeline is functionally analogous to function chaining within a single runtime like in Python or Ruby No it is not. See my response below.
- integraton 11y agoYes it is, and stop trying to pretend otherwise. Your long-winded comments about PowerShell's internal language and runtime features are utterly irrelevant since they exist within with PowerShell runtime, just as the features of Ruby, Python, JavaScript, the JVM languages, etc all exist within those runtimes. You also tried to falsely claim that cmdlets are not instances of .NET classes in a previous discussion (https://news.ycombinator.com/item?id=9461682 https://news.ycombinator.com/item?id=9461682) and your comments are perfect examples of how PowerShell advocates use long posts of handwaving, obfuscation, and verifiably false claims to try to pretend PowerShell's functionality is different than it actually is.
- useerup 11y ago> You are the same person who tried to falsely claim that cmdlets are not instances of .NET classes The fact stands, cmdlets can be implemented as .NET classes, but they can also be implemented through script (i.e. not .NET classes) or through manifests where cmdlets are generated for WMI/CIM classes. I don't know why you continue to ignore this, or even why it is important. I point out that you are incorrect and point to a authoritative source that demonstrate the point. The relevant section of the PowerShell section: --- ... A module can contain one or more module members, which are commands (such as cmdlets and functions) and items (such as variables and aliases). The names of these members can be kept private to the module or they may be exported to the session into which the module is imported. There are three different module types: manifest, script, and binary. A manifest module is a file that contains information about a module, and controls certain aspects of that module's use. A script module is a PowerShell script file with a file extension of ".psm1" instead of ".ps1". A binary module contains class types that define cmdlets and providers. Unlike script modules, binary modules are written in compiled languages. Binary modules are not covered by this specification. Windows PowerShell: A binary module is a .NET assembly (i.e.; a DLL) that was compiled against the PowerShell libraries. --- I will point out when your claims about PowerShell are incorrect. It's an opportunity to learn something. Please address the topic, not the poster.
- deleted 11y ago[deleted]
- integraton 11y agoYour statements about cmdlets are simply false, and you are again trying to handwave past the fact that PowerShell is a .NET CLI and that its object pipeline only exists within its .NET runtime and is analogous to function chaining within a single runtime like in Python or Ruby, not Unix pipelines. From the Microsoft documentation, which I quoted to you in a previous discussion, so you should already know it (which would then indicate you are being deliberately dishonest): "Cmdlets are instances of .NET Framework classes; they are not stand-alone executables." > they can also be implemented through script (i.e. not .NET classes) Your statement here is factually wrong. They are called "advanced functions," previously "script cmdlets," mimic the behavior of true cmdlets ("bind as cmdlets"), but are not true cmdlets. They also exist within the .NET runtime, which is the relevant issue. > through manifests where cmdlets are generated for WMI/CIM classes. Then those generated cmdlets must be instances of .NET classes, because by definition that's what cmdlets are, and they exist within the .NET runtime, which is the relevant issue. And in all cases, they exist within the PowerShell/.NET runtime and are not arbitrary executables written in arbitrary languages. Thank you, however, for providing yet another demonstration of how PowerShell advocates consistently resort to handwaving, obfuscation, and false claims in order to try to pretend PowerShell is functionally different than it actually is.
- useerup 11y ago> Then those generated cmdlets must be instances of .NET classes, because by definition that's what cmdlets are Nope. The problem is that you searched for confirmation that cmdlets was "just" .NET classes (I really don't get why that is important), and then you dive into documentation for C# programmers and point out how the documentation for C# programmers is telling the C# programmer that if he wants to create a cmdlet he can do it with a C# class. D-oh! When I point to the PowerShell specification and demonstrates how it does not claim that cmdlets are .NET classes you ignore it. I point out how it enumerates the 3 different ways to make cmdlet modules: Binary, script and manifest, of which only the binary module variety implement cmdlets as classes. You could equally well claim that Web Services are just MVC Controllers, because in the documentation for MVC I can find out how to implement web services using MVC controllers. > ... and they exist within the .NET runtime, which is the relevant issue Why? If the .NET runtime has become sediment to the point where the OS is always distributed with the runtime, where important OS functions (like troubleshooting) is implemented using the runtime, where remote administration is based on the runtime, at what point do you accept the runtime as part of the OS? .NET IS part of Windows now, has been since Windows 7 SP1 (IIRC). Troubleshooting packs, guides etc. are written using PowerShell. When your network gets the hiccups, and Windows proactively offers to troubleshoot the network connection, it is PowerShell that is running underneath. The new PackageManager is PowerShell based. > Thank you, however, for providing yet another demonstration of how PowerShell advocates consistently resort to handwaving, obfuscation, and false claims in order to try to pretend PowerShell is functionally different than it actually is. No need for snide remarks. I stand by all of my claims. It is you who selectively quote C# programmers documentation out of context. All you have proven is that if a C# programmer wants to create a cmdlet using C#, he must implement it using a class.