4 ms·
Maybe it's just me, but I find PowerShell to be so verbose. Why does every parameter have to have consist of a camelcased sentence? I'm a good typist, but I d
by mrunkel 6y ago
Maybe it's just me, but I find PowerShell to be so verbose.
Why does every parameter have to have consist of a camelcased sentence? I'm a good typist, but I don't think what you wrote is better than
curl wttr.in
But that might just be (my) programming.
- bostonsre 6y agoIt's case insensitive and there are short aliases for commands. I live in Linux, but used it way back when. It's an object oriented shell that is kind of awesome and intuitive. Bash is great and you can get shit done, but i don't think it's as user friendly as powershell.
- wruza 6y agoHonestly PS feels like yet another cryptic language with irregular/nih naming of functions and arguments (like AHK which is great, but invented its own megacryptic irrational language instead of taking something generic, and now you have to google every damn thing). If I programmed for PS, then okay, but seriously, Invoke-Rest-?Method, -Uri/Url, .content — how much semantics do you learn until you give up? I’d better http.get(url="...").body in my console rather than this Invoke-WhatEver thing, because at least it seems programming language-y and names are consistent with all other web software. Ed: strictly speaking, URI is not even a thing that you pass to a web request. I bet that IRM couldn’t fetch urn:isbn:0451450523.
- vips7L 6y ago> my console rather than this Invoke-WhatEver thing, because at least it seems programming language-y and names are consistent with all other web software. Because curl is consistent? > urn:isbn:0451450523 Curl can't do whatever this is either?
- wruza 6y agoBecause that seems programming language-y and names are consistent with all other web software. >Curl can't do whatever this is either? Right. This is a valid URI, which Invoke-RestMethod uses as a parameter name (-Uri) and which is a unique id for a resource and not its location (it could be, but not in this particular case). They should not have call that argument “URI”, if what they actually do is fetching from a URL.
- lzybkr 6y agoPowerShell can be shorter by 1 character for this use case: irm wttr.in irm is an alias for Invoke-RestMethod which is similar to Invoke-WebRequest but better for non-html responses like json or plain text.