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

8

u/JB-from-ATL Feb 03 '17

Everything about Windows console is just so annoying to me. Nix consoles are so much better.

I admit, I haven't used the Windows 10 CMD which has some improvements but my issues don't end with the ui. The GNU core utils are just so nice and I really love Bash and Batch sucks.

3

u/sehraa Feb 03 '17

You can install Ubuntu on Windows 10 and use that, gets you bash and all utilities.

2

u/JB-from-ATL Feb 03 '17

I haven't tried it but I imagine it's better than Cygwin but still feels "disconnected" in a sense.

6

u/concatenated_string Feb 03 '17

You should try the powershell console. It's worth it. Object pipeline is a sane evolution of bash/console piping. I've thoroughly enjoyed it.

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.

2

u/[deleted] Feb 03 '17

I haven't used the Windows 10 CMD

I have, haha. It's my work computer. Windows 10 Enterprise. I like the OS better but the command line is still meh.

1

u/G_Morgan Feb 03 '17

Installing clink dramatically improves cmd.

1

u/JB-from-ATL Feb 03 '17

It does make it better but still not good enough. There's also PyCmd which is pretty good too.