Linked by Adam S on Tue 8th Jul 2008 12:47 UTC
Talk, Rumors, X Versus Y In 2006, Microsoft released Windows Powershell, a new command line shell that, via cmdlets, scripts, and executables, allow core system administration tasks to be scripted. While this functionality has been available on Unix-type systems for decades, Microsoft's version will almost certainly, within a few years, be available on several hundred million PCs. So how does the Powershell stack up against Linux favorite bash? MSDN links to this Bash vs Powershell article.
Thread beginning with comment 321902
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: I don't get PowerShell
by drahca on Tue 8th Jul 2008 13:38 UTC in reply to "I don't get PowerShell"
drahca
Member since:
2006-02-23

From what I understand PowerShell more or less is intended to replace standard BAT files. Maybe you can elaborate a bit as to why it cannot replace BAT files in your view.

While I am no expert on PowerShell, I do like the idea of using introspection to preserve type information between processes connected through a pipe. In Bash you are mostly stuck to using awk to parse the text-only output of some tool, since all type info has been lost.

Does anyone know why they chose the '$' like PHP syntax for variables? Does this facilitate parsing or something? The dollar sign in PHP mostly feels redundant, although the double $$ is sometimes really handy.

Reply Parent Score: 3

RE[2]: I don't get PowerShell
by grfgguvf on Tue 8th Jul 2008 14:05 in reply to "RE: I don't get PowerShell"
grfgguvf Member since:
2006-09-25

One of the goals of Powershell was matching the power of Unix scripting tools.

So they intentionally chose a Perl-like syntax, hence the $.

Reply Parent Score: 0

RE[3]: I don't get PowerShell
by errant on Tue 8th Jul 2008 14:34 in reply to "RE[2]: I don't get PowerShell"
errant Member since:
2006-01-06

One of the goals of Powershell was matching the power of Unix scripting tools.

So they intentionally chose a Perl-like syntax, hence the $.


Unless you have a quote from one of the developers of powershell somewhere I'd really have to question this statement. That sounds a lot like "Oh I wanted to make a car with the power of a Porsche so I copied the horse emblem."

The reason why a lot of early languages used variable identifiers such as the $ was because it made life so much easier from the parser point of view, especially if you are designating a difference between the variable as an object in its own right or whether you wanted the contents of the variable.

Now with regard to why powershell uses it I don't have a good answer, its supposed to be based around the .net framework which doesn't need those type of identifiers and to be honest it feels like if they were constructing a scripting language from scratch they would have made it syntactically comparable to more modern languages.

Reply Parent Score: 2