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.
Permalink for comment 321917
To read all comments associated with this story, please click here.
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.
Member since:
2006-01-06
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.