Click here to Skip to main content
15,881,381 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: PowerShell AND C# Pin
MSBassSinger4-Jul-22 6:50
professionalMSBassSinger4-Jul-22 6:50 
GeneralRe: PowerShell AND C# Pin
Kate-X25711-Jul-22 0:32
Kate-X25711-Jul-22 0:32 
GeneralRe: PowerShell AND C# Pin
NiL^4-Jul-22 5:29
NiL^4-Jul-22 5:29 
GeneralRe: PowerShell AND C# Pin
rnbergren4-Jul-22 5:46
rnbergren4-Jul-22 5:46 
GeneralRe: PowerShell AND C# Pin
MSBassSinger4-Jul-22 6:54
professionalMSBassSinger4-Jul-22 6:54 
GeneralRe: PowerShell AND C# Pin
jochance4-Jul-22 11:13
jochance4-Jul-22 11:13 
GeneralRe: PowerShell AND C# Pin
MSBassSinger6-Jul-22 7:38
professionalMSBassSinger6-Jul-22 7:38 
GeneralRe: PowerShell AND C# Pin
jochance6-Jul-22 8:40
jochance6-Jul-22 8:40 
If you think about the C# to open a process and pass it arguments, the Powershell syntax is less verbose than that would be.

Part of it is they started kicking around together as kids and since neither was an adult it's a lord of the flies sort of deal. (Much respect to both, but not giving up the metaphor.)

C# only not terribly long ago (C# 3/4, respectively) added var/dynamic that would enable some of what powershell is doing with sticking command results into objects.

The typical problem space (system administration/networking/security?) also has all these concerns that you simply do not have with the majority of what C# code out there is doing.

I'm not saying I wouldn't love it if it PowerShell were more C#-y and less whatever it is.

But I do see challenges and reasons not to simply say "let's make it a C# console that sends input (script file or otherwise) straight to IL and onwards to a shell-specific runtime".

Nowadays? Even if the guy tasked with and enabled to undertake a massive re-write of PowerShell looked at the state of things and decided that approach was a really good way to go? Well you've got all this baggage that plane simply wouldn't carry. There are probably many many folks less C# dev and more really smart scripter-admins (or wanting nothing to do with writing any of it) who depend on what's there and if you pulled the rug in the name of "code sanity" they would be very unhappy.

Maybe it would be possible for the interpreter to detect "old-style" vs "new" and translate the old stuff on the fly...
GeneralRe: PowerShell AND C# Pin
MSBassSinger6-Jul-22 9:17
professionalMSBassSinger6-Jul-22 9:17 
GeneralRe: PowerShell AND C# Pin
jochance6-Jul-22 10:15
jochance6-Jul-22 10:15 
GeneralRe: PowerShell AND C# Pin
KLPounds5-Jul-22 3:06
KLPounds5-Jul-22 3:06 
GeneralRe: PowerShell AND C# Pin
Kirk 103898215-Jul-22 6:30
Kirk 103898215-Jul-22 6:30 
Generalwordle Pin
jmaida1-Jul-22 8:12
jmaida1-Jul-22 8:12 
GeneralRe: wordle Pin
OriginalGriff1-Jul-22 9:11
mveOriginalGriff1-Jul-22 9:11 
GeneralRe: wordle Pin
jmaida1-Jul-22 10:50
jmaida1-Jul-22 10:50 
GeneralRe: wordle Pin
OriginalGriff1-Jul-22 11:05
mveOriginalGriff1-Jul-22 11:05 
GeneralA tale of rabbit holes and multipart/form Pin
Marc Clifton1-Jul-22 0:32
mvaMarc Clifton1-Jul-22 0:32 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Greg Utas1-Jul-22 1:10
professionalGreg Utas1-Jul-22 1:10 
GeneralRe: A tale of rabbit holes and multipart/form Pin
#realJSOP1-Jul-22 1:15
mve#realJSOP1-Jul-22 1:15 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Greg Utas1-Jul-22 1:18
professionalGreg Utas1-Jul-22 1:18 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Randor 1-Jul-22 2:00
professional Randor 1-Jul-22 2:00 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Marc Clifton1-Jul-22 7:59
mvaMarc Clifton1-Jul-22 7:59 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Jacquers1-Jul-22 2:05
Jacquers1-Jul-22 2:05 
GeneralRe: A tale of rabbit holes and multipart/form Pin
raddevus1-Jul-22 3:09
mvaraddevus1-Jul-22 3:09 
GeneralRe: A tale of rabbit holes and multipart/form Pin
Marc Clifton1-Jul-22 8:02
mvaMarc Clifton1-Jul-22 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.