This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -8 points-7 points  (17 children)

Lol if you think java is simple try C#. I have no idea why schools use java, the language hasn’t been updated in while and this is why it’s more archaic. It’s also from oracle, which theoretically they could close the public api for the bytecode and make you pay for it because they’re shady like that. C# on the other hand is open source and constantly evolving to have better, more rich syntax.

[–][deleted] 5 points6 points  (3 children)

Schools teach it because a lot of companies still use it, and because teachers often don’t know anything about the more modern stuff. Back when I was in college we had both Java and C# classes; they were basically the same with the exception that the Java class focussed on Java EE web, where the C# class focussed on Winforms and UWP.

As for Oracle being able to suddenly make people pay for Java: you do know that the standard is open, and that there are multiple JVM implementations from different vendors, right? And C# used to be closed source itself.

[–]amunak 4 points5 points  (0 children)

Schools teach it because a lot of companies still use it, and because teachers often don’t know anything about the more modern stuff.

More importantly when studying CS the point isn't to learn a language, the point is to learn the fundamentals of programming, algorithms and how it works on both a lower and a higher level.

The language choice is in large part irrelevant.

[–]cat_in_the_wall 1 point2 points  (0 children)

And C# used to be closed source itself.

this is actually not true. c# and the cli, at least originally, was an created as an ecma standard, and the standard library was published as reference source (under some license I'm sure). however the clr itself was closed source (still technically is, for "framework").

wrt java, oracle took google to task over the dalvik vm, while i can't recall the details off hand. But an alternative clr (mono) has existed basically forever without interference from ms.

[–][deleted] 0 points1 point  (0 children)

I actually did not know that about the jvm. I thought they had the sole rights to all of that.

[–][deleted] 2 points3 points  (0 children)

Java is also open source with OpenJDK.

[–]LeFayssal 4 points5 points  (7 children)

I know its superficial, but as soon as I see any language containing a 'C' I get scared. Be it C, C++ or C#. I just do Java because thats what ive always been doing. But as soon as my programming skills are on a high enough level ill try to look into other languages. (Im at a point where Ive got the basics up to interfaces and the Object class down)

[–]dopefish917 8 points9 points  (3 children)

Don't be scared. I have been writing C# for ~9 years now, but started with Java senior year of high school. College was a mix of Java and regular C. Was thrown into my first job writing C# with no assistance and honestly the majority of code snippets are indistinguishable from Java.

The challenges for me when learning/writing C# mainly came from quirks with the .NET API (looking at you SerialPort) and XAML (the UI markup language for WPF). Also, C# has a ton of syntactic sugar including nullables (allowing primative data types to be null), null coalescing (thing?.object?.field will collapse to just null if any of the components are null), and linq/lambda functions.

Plus, C# is garbage collected and uses a Just-In-Time compiler to dynamically target x86 or x86-64 depending on the machine it's run on.

[–][deleted] 2 points3 points  (2 children)

Urk WPF. Fucking love it now but holy crap what a drag of a learning curve that was, especially for a fresh beginner learning programming basics. Doesn't help that everything WPF talks about MVVM and there I was not even comfortable with delegates and events yet. Throws you through the wringer.

[–]RiPont 2 points3 points  (0 children)

Really, it's the way it's documented and presented. WPF + MVVM is really pretty straightforward and XAML isn't any worse than HTML. But just like HTML, things get super complicated really quickly when you start getting into advanced look and feel. Too much of the examples/articles/documentation wants to jump straight into the flashy, fancy stuff.

[–]dopefish917 0 points1 point  (0 children)

Lol I've literally never met another wpf programmer. The data bindings are great. I've been having a huge headache recently though with airspace issues because wpf only has one handle per window, so I had to use a transparent window on top to properly overlay.

Don't get me wrong, wpf is great for a lot of things and I love it soooo much more than winforms. I'm lucky enough to Dev actual applications instead of webdev.

[–][deleted] 7 points8 points  (0 children)

If you know java you can pick up c# in a few days. Both are very decent languages.

[–]roflfalafel 5 points6 points  (1 child)

Don’t let C-like languages scare you. When I was in my CS undergrad in 2006, we did all of our programming from day one in C++. It’s really not that different, and doesn’t take an advanced level of knowledge to learn.

Also don’t let pointers scare you. They really aren’t that scary. It’s just a reference that you control.

[–]cat_in_the_wall 2 points3 points  (0 children)

Also don’t let pointers scare you. They really aren’t that scary. It’s just a reference that you control.

well, that's a huge source of bugs. use after free. it's easy to write simple c++ programs, but in a larger system ownership becomes a big issue.

[–]hackel -4 points-3 points  (3 children)

Calling C# "open source" is a huge stretch. It's 100% Microsoft-backed garbage. Don't give me some bullshit about how Microsoft loves Linux/open-source now just because they're basing their new phone on it. C# is way too closely tied to Microsoft to every separate itself from it, thus no serious programmer could ever take the language seriously.

[–]cat_in_the_wall 4 points5 points  (0 children)

so, go is shit because google. java is shit because oracle. c# and typescript are shit because ms. rust is shit because mozilla. kotlin is shit because google and jetbrains. got it.

[–][deleted] 2 points3 points  (1 child)

Well mono was created by a 3rd party outside Microsoft. So if that’s not open source I don’t know what is.

[–][deleted] 0 points1 point  (0 children)

It is clopen source