ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 205 words in the discussion.
Trending Topics
#languages#powershell#windows#string#date#before#put#main#file#ones

Discussion (3 Comments)Read Original on HackerNews
So if you iterate over files for example, you can get the modification date as an actual DateTime property and not some string that might contain a date in some locale that you potentially have to parse then.
> PowerShell scripts require all subroutines to be defined before they can be called
True but so do Python and other languages. My solution is to put main at the top and then the very last line of the file calls main.
> "New" as a verb
Look in your File menu.
> PowerShell ISE
Was put in maintenance mode in 2017, 3 years before this article was written. Granted it still comes bundled in Windows. It actually has some great features, but also many quirks. New work is done in Visual Studio Code.
Many of the rants could be made against other languages. I admit PowerShell is not perfect, but there are some really cool things about it.
Bjarne Stroustrup, the creator of C++, is famous for the quote: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".