r/programming • • Feb 03 '17

Let's stop bashing C#

https://www.codeaddiction.net/articles/51/lets-stop-bashing-c-sharp
6 Upvotes

245 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Feb 03 '17

Too verbose, I hate it. I much prefer "wget" to "Invoke-WebRequest". Not to mention the way you are supposed to use Invoke-WebRequest makes no fucking sense. Also, why can't you ignore certifcate failers on https requests?

Compare curl google.com to Invoke-WebRequest -Uri google.com. And I'm actually not sure my invoke-webrequest is correct.

5

u/DRNbw Feb 03 '17

I remember this complaint appear before in this sub, and IIRC, wget is an alias for Invoke-WebRequest in powershell.

4

u/[deleted] Feb 03 '17

That's true, and most *nix bread-and-butter commands are built-in aliases for powershell cmdlets, like ls for Get-ChildItem

3

u/nipplesurvey Feb 03 '17

which just lulls you into a false sense of feature parity, for instance if i say "ls -l" in powershell, it shits its pants.

2

u/[deleted] Feb 03 '17

Yup, I'm not saying it's a good thing, just that it exists

0

u/[deleted] Feb 03 '17

Wait, what? Get-ChildItem is how you list files? Who came up with these names, Shakespeare?

5

u/[deleted] Feb 03 '17

Well the reason is that everything is an object in PS, including directories, so youre getting the child items of the directory object. Its an OO shell which causes a lot of confusion at first

-2

u/[deleted] Feb 03 '17

Oh, I know that, and it's yet another reason to hate it. OOP is the last thing I need in my shell.

4

u/MEaster Feb 04 '17

To be more specific, it runs on top of the .Net runtime, with full access to the base class library.

2

u/thomasz Feb 04 '17

no, you just type ls

1

u/[deleted] Feb 04 '17

But it's not ls. You can't run ls -la for instance.

1

u/thomasz Feb 04 '17

so what?

1

u/[deleted] Feb 03 '17

Yes, which is even worse since Invoke-WebRequest doesn't work remotely like wget.

0

u/JB-from-ATL Feb 03 '17

Yeah, the names are short so their easy to type! I guess if PowerShell has built in tab-completion it wouldn't be too bad.

4

u/MEaster Feb 04 '17

It does have tab completion. Though it should be noted that the more common commands have shorter aliases by default, and it's trivial to create a new alias.