3 ms·
OK, I get what you want. My understanding is that the reason you can write a cmdlet in C# is because C# provides a facility to return .NET objects [more or less
by brudgers 13y ago
OK, I get what you want. My understanding is that the reason you can write a cmdlet in C# is because C# provides a facility to return .NET objects [more or less] and that's only in so far as it interops with the .NET API.
Ruby implementations will tend to return a byte stream rather than a value a value against the .NET API. Even if Microsoft provided another API on top of the .NET API, the same situation would exist because Ruby implementations usually don't write to that API by default. It's turtles all the way down on the .NET side.
Programming .NET in Ruby requires writing to the .NET interface from the Ruby program. If one wants to program to the .NET interface through Powershell from Ruby, a Ruby program can always output text that can be interpreted as a Powershell script. One way or another, the responsibility is on the program to write to an API.
What would be the output of a Brainfuck program that should operate as a PowerShell cmdlet? Would it ever be more than text which can be interpreted as a PowerShell command or script?
- Touche 13y agoYou're entirely missing my point. Powershell shouldn't have been written to require .NET. Full-stop. That's a deal-breaker and highlights the quote I original referenced. Stop building high-level stuff on top of other high-level stuff where it's uses are restricted to only a small subset of potential developers.