4 ms·
(Arguably?) Powershell seems to take this approach. I have to admit, I like it philosophically, but whenever I try to use it there's some part of it that feels
by overgard 7y ago
(Arguably?) Powershell seems to take this approach. I have to admit, I like it philosophically, but whenever I try to use it there's some part of it that feels icky to me. It might just be microsoft's ConventionOfOverusingCapitalizationEverywhere though.
Here's an example of what powershell looks like:
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
(Install-WindowsFeature Containers).RestartNeeded
Restart-Computer
IDK, it's undeniably easier to read than the Unix version. I have to admit some part of me just doesn't love how it looks though.
- eschaton 7y agoIn DCL on VMS, this would look something like: $ INSTALL /MODULE=DockerMsftProvider /FORCE $ INSTALL /PACKAGE=Docker /PROVIDER_NAME=DockerMsftProvider /FORCE $ RESTART /NEEDED /CONTAINERS=* $ RESTART /SYSTEM This is all an example to show style, not real DCL. Part of what makes DCL great is that you use a single, consistent API to add commands and flags to the system, connect your code into the system, and then interpret them when your code gets called at runtime. This even leads to common verbs for different purposes, making the whole system feel more unified.
- chrismorgan 7y agoFor a case like this, idiomatically I believe it’d end up as something like this in Powershell (though I’ve never seriously used Powershell): Get-JiraAttachment -Ticket {{args.ticket}} | Remove-JiraAttachment … because Powershell pipes are structured, rather than just being strings. If you were just wishing to emit the attachment IDs, you’d pipe the first bit through something like `Select Id`.
- mixmastamyk 7y agoAgreed, the lack of spaces and excessive capitals hurts readability. I prefer snake_case myself, with a few capitals here and there, like English text.
- jodrellblank 7y agoPowerShell is not case sensitive, so it could look like install-module -name dockermsftprovider -force if you wanted. Community style guides would complain and autocomplete would 'fix' the caps for you, but the caps don't do anything meaningful.