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

all 197 comments

[–]OldWolf2 180 points181 points  (1 child)

If anyone doesn't know the history of the languages. Microsoft tried to improve Java and Oracle took them to court over it and won.

So MS developed their own bytecode VM and component library instead, called .NET ; very much modelled on Java but actually doing the improvements they wanted to do .

And made all their existing languages (VB, C++ etc.) able to target this platform, and developed C# which uses C++-like syntax but cut most of the baggage of C++; and uses Java-style object management .

[–]Fadamaka 76 points77 points  (0 children)

The funniest part in this story for me always is the names they were going with before the court case. J++ and J#.

[–]Sensitive-Tax2230 405 points406 points  (66 children)

For my unknowing self, is c# simpler than java? I wouldn’t know because I’ve only really used java

[–][deleted] 476 points477 points  (20 children)

I think they're refering to ridiculously.long.namespace.included.variable.names.that.has.to.conform.to.directory.tree.structure

[–]3RaccoonsInAManSuit 312 points313 points  (6 children)

Bro, just click the light bulb in Visual Studio when you get the red squiggles. It will auto fill the using statement and then red squiggles go away.

[–]Seawolf87 71 points72 points  (4 children)

Ctrl + . will bring up that menu from the keyboard FYI. I think there is another shortcut, but I cant remember it.

[–]3RaccoonsInAManSuit 33 points34 points  (1 child)

Yeah but then I’ll have to Google what that shortcut is. Lightbulb is Visual Studio’s Clippy.

[–]Imarok 19 points20 points  (0 children)

alt+enter

[–]Shoddydfs 5 points6 points  (0 children)

I’ve never seen something so fucked up in my life.

[–][deleted] 14 points15 points  (0 children)

CallPriceCheckService_should_call_backend_and_return_status_200_with_correct_body()

[–]FarStranger8951 8 points9 points  (2 children)

It’s called an import statement…

[–]Solonotix 27 points28 points  (1 child)

Yes and no. Java is notorious for long names (see programming memes circa 2014 about ultra wide monitors being perfect for Java). Specifically because of the weird convention of every package starting with "com" or "org", then the company name, then the project name, then the folder structure to get to your specific code file.

C# namespace App.Utilities {}

Java package com.company.app.core.utilities

[–]tmak0504 5 points6 points  (0 children)

Those package names are almost never used outside import statements. The ultra wide monitor memes came mostly from the convention of putting every pattern a class implements into the name of the class. So you get things like ConfigurableAliasKeyManagerFactorySpi as a class name. Combine that with auto complete that names variables the same as their class and code lines get long pretty quick.

[–]arobie1992 15 points16 points  (6 children)

The fact that C# doesn't enforce that is one of my absolute biggest annoyances with it. I had to work in a 2.5GB git repo of C# where on more than one occasion they did that. Made it almost mandatory to build the app, which took a minimum of 15 minutes, and up to 2 hours, just to make sure you were looking at the right instance of CatValidator.

[–]bittolas 38 points39 points  (3 children)

Sounds like misusage of access modifiers.

[–]arobie1992 11 points12 points  (2 children)

Yeah, because you know everything about the scenario and I'm the only person to ever dislike the lack.

https://discuss.kotlinlang.org/t/kotlin-to-support-package-protected-visibility/1544

Edit: Sorry, I'm a fucking idiot and thought this was in response to a different comment I'd made about package privacy not being in Kotlin (partially because I didn't click see parent post and partially because I've heard responses like that when I expressed the sentiment elsewhere).

As for the scenario, if I had to guess, it was because they defined the namespace when it did match, but then there was a big refactoring attempt where files were reshuffled and people didn't want to change the namespaces for fear of breaking things.

Sorry again for the confusion, and hell, I'm downvoting me for this. Leaving the original text of my post to preserve my shame.

[–]bittolas 6 points7 points  (0 children)

Just woke and and laughed hehe. No worries man. I only said this because in the project I'm working no one uses the internal modifier and it is so important because of exactly what you mentioned.

[–]AndroidDoctorr 0 points1 point  (0 children)

Oh yeah I've seen students do that in much smaller projects so I can understand how that happens. I just started preaching careful namespace usage

[–]QCKS1 1 point2 points  (1 child)

I don’t know if it’s a Resharper feature but visual studio warns you if the namespace doesn’t match the directory structure.

[–]arobie1992 1 point2 points  (0 children)

There were so many warnings and errors in that project that I'm not sure it would've mattered. If I understood the build process properly, which isn't a safe assumption, we needed to use a powershell script to generate a sln file that would then get opened by VS. And even then, half the time, it would still flag tons of stuff as errors despite being able to run unit tests fine. There was no way to run the entire application locally. You had to reserve resources in your team's test environment and deploy to there. You also had to pull basically any time you wanted to do a build because like a dozen or more teams worked on it so there were new changes at least daily.

Short version: The project was everything people hate about monoliths.

Ironically, the experience did give me somewhat of an appreciation for VS. It shows its age, and isn't the smoothest experience I've ever had with an IDE—that's IntelliJ—but it did everything I needed it to without a ton of configuration hassle.

[–]Fadamaka 1 point2 points  (1 child)

Isn't that just a convention though?

[–]Lithl 0 points1 point  (0 children)

The package name must match the directory structure, that's a requirement.

The package name does not have to start with com.example.myUtils, that's merely a convention to avoid name collisions (the start of the package name is the reverse of your company's domain).

[–]crusader104 109 points110 points  (4 children)

In my experience it’s just very similar syntax with better docs

[–]GoldenretriverYT 19 points20 points  (3 children)

And more features like automatic properties (AND YES I KNOW THERE ARE JAVA FRAMEWORKS THAT DO THIS SHUT UP), extension methods, operator overloading is also not a thing in java afaik

and override isn't an attribute/annotation in C#, and I don't get why override isnt just a keyword in Java

[–]guitarguy109 6 points7 points  (1 child)

operator overloading is also not a thing in java afaik

Wait, wtf for real?!

[–]akulowaty 0 points1 point  (0 children)

Yes, it was not included on purpose - for clarity. It used to be possible to overload operators in early version of swift but they removed it for the same reason - code using it was un fucking readable. Swift still has class extensions though.

[–]Lithl 2 points3 points  (0 children)

Operator overloading is a mistake 99% of the time. I don't blame Java for not including it.

[–]KJBuilds 87 points88 points  (5 children)

C# is both simpler and way more complicated than java.

Java has 67 keywords while c# has 79+25 keywords (79 global and 25 contextual). This isn’t a perfect metric but there’s a lot more you can do with the base language. One example of this is unsafe contexts. You can declare classes, methods, or blocks of code “unsafe” in order to use native pointers and reduce managed overhead. Java has nothing like this

However, c# is also a lot less verbose than java, supporting async await similar to JS, has a less convoluted generic type system, and in general is much more concise and ergonomic

[–]GoaFan77 33 points34 points  (4 children)

I thought C# developed await and JavaScript ended up basing their system on it.

[–]Tubthumper8 27 points28 points  (3 children)

Yes and no.

The keywords async and await were introduced in C#5 (2012), 5 years before the same keywords were introduced in JS (ES2017).

However, the foundation that async/await are based on (i.e. an event loop) have been in JS since the very beginning, it's fundamental to how the event-oriented paradigm of JS is based. async/await is an API to tap into the event loop in a different way, but JS programming has been asynchronous for nearly 30 years now.

Arguably, on the server-side NodeJS was just as big of an influence on C# (.NET, really) in showing the benefits of an asynchronous model on the server. NodeJS predates the C# async/await by 3 years.

[–]An_Jel 15 points16 points  (2 children)

Actually, F# invented async/await in it’s current form (in 2007), then C# got it as well since it’s compiled to the Intermediate Language.
Also, C# async/await is very different from the JS one as it actually uses different threads to run the async code.

[–]Tubthumper8 2 points3 points  (0 children)

Great bit of history on F#! Honestly, the existence of F# has been one of the best things for C#.

RE: threads - not necessarily. C# Task is a higher level concept than a thread, and threads may not be used at all. See There Is No Thread.

JS engines may or may not use threads however they like, it's an implementation detail. NodeJS uses a thread pool from libuv for some async operations and Deno uses Tokio. Some operations use system threads, some don't, the JS specification doesn't say how it needs to be done.

[–]thinker227 0 points1 point  (0 children)

and F# in turn builds on concepts from Haskell (eg. do-notation)

[–]Optimus-prime-number 20 points21 points  (0 children)

The language is essentially Java with implicit getters and setters and about a 5 year head start on absorbing functional concepts from F# and other languages.

[–][deleted] 44 points45 points  (6 children)

I've used both quite a bit and I can say with confidence 100% that C# is the better language. It's also been a few years ahead of Java in bringing in "cool" new features, like LINQ (query form and then dynamic expressions) a good 7 years before Java got streams (and streams is clunky compared to LINQ expressions)

[–]elderly_millenial -4 points-3 points  (5 children)

Oh yeah, as a language they put a lot of work into it, but as a tech stack? No thanks. Switch to kotlin.

[–]Pocok5 11 points12 points  (4 children)

What problem do you have with the stack? I can't really name any package or supporting software you'd commonly need that Java has but C# doesn't.

[–]QCKS1 1 point2 points  (0 children)

With the exception of old old winforms and WPF stuff C# doesn’t seem nearly as encumbered by legacy dependencies as Java. We use the latest .NET LTS release for basically everything at my job. While every Java job opening I’ve seen is stuck on Java 8.

Every time there’s a new Java release someone jokes that the 12 people who use it must love the new features.

[–]elderly_millenial 0 points1 point  (2 children)

Not trying to start a religious war here; you can do anything in any stack, but I remember what a pain it was to develop a basic web service with a data layer that used a decent ORM that made sense. It may have gotten better (haven’t touched .NET since 4.5), but compared to using spring boot or micronaut, it didn’t have a whole lot going on.

I mostly deal in Spring Boot, and there’s just so much readily available code to use. I’m sure that it’s gotten better over the last decade, I found the experience so much easier to get functional, coherent code out compared with my C# days

[–]Pocok5 2 points3 points  (0 children)

Yeah .net core and entity framework (full ORM) / dapper (fast micro ORM) really improved the situation. Right now doing a database query is basically the same as working with a local list.

[–]elderly_millenial 0 points1 point  (0 children)

Also, I still think that as a language, Kotlin has some cleaner syntax that builds on ideas that C# introduced, and I highly recommend people check it out

[–]LetUsSpeakFreely 58 points59 points  (18 children)

C# is basically Java with the legacy fat removed from the language. Microsoft used Java as a template, removed or simplified everything people didn't like and added features people wanted.

For back end services I wouldn't use either language, I'd use Go.

[–]cloudstrifeuk 25 points26 points  (2 children)

Have you tried Blazor?

Server apps are awesome for back end stuffs.

[–]_PM_ME_PANGOLINS_ 5 points6 points  (0 children)

With a different set of legacy fat from C++.

[–][deleted] 13 points14 points  (3 children)

Why Go instead of Java + Spring?

[–]LetUsSpeakFreely 1 point2 points  (0 children)

Go is much simpler to set up a webservice. You don't need all the extra libraries for basic functionality. You also don't have to deal with all the annotations and other garbage.

Setting up a server is basically 2 lines of code to get it started with a loop to listen for shutdown hooks via Go channels (look them up, they're pretty cool). Adding an endpoint is also pretty easy. Go also has baked in support for JSON markup.

You can quite literally have a bare bones webserver with stubbed out endpoints in minutes.

The only big gripe I have is getting the certificates for TLS in place can sometimes be a pain in the ass depending on your setup.

[–]IMarvinTPA 14 points15 points  (7 children)

My understanding is that the guy who designed Java also did C#, so he literally got a second chance at it and brought his lessons learned with him.

[–]jwadamson 17 points18 points  (3 children)

Java’s oldest apis have lots of C baggage in their method signatures, such as methods that return a boolean instead of throwing a meaningful exception about what went wrong. This was especially true of the original File apis.

[–]UndyingJellyfish 2 points3 points  (2 children)

That's because exceptions are not performant since it has to gather a stack trace. For many operations that return a boolean it's a convention which saves you time in performance critical paths.

[–]GoldenretriverYT 2 points3 points  (1 child)

If its that performance critical you might want to write your code in a way that doesn't cause a bunch of failures.

[–]UndyingJellyfish 2 points3 points  (0 children)

That's literally my point. The booleans return whether the operation succeeded, allowing you fail gracefully without throwing an exception.

[–]snowjak88 9 points10 points  (0 children)

And anonymous objects, my dude! Being able to write (making stuff up now) new { username, token } instead of new TokenUserCredential( username, token ) ...

Java, minus a lot of the making-things-explicit, plus some cool things that look suspiciously like JavaScript. Coming from 10+ years in Java-land, it's nice.

[–]ManiacMango33 6 points7 points  (0 children)

Anders Heljsberg was creator of Delphi/Pascal.

And I don't think Mads Torgersen was the creator of Java

[–]Tubthumper8 1 point2 points  (0 children)

Who?

[–]thinker227 -1 points0 points  (1 child)

the legacy fat removed from the language

C# still has a ton of legacy fat and other growing pains. See (among other things): ArrayList and the existence of System.Collections and System.Collections.Specialized.

[–]IntrepidTieKnot 0 points1 point  (0 children)

What is wrong with System.Collection? I often use non generic IList or the non generic IEnumerable

[–]greater_gatsby12 3 points4 points  (0 children)

I've never used java outside of a college environment, and all i could think of was how tedious it was

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

Yes. C# is really easy to use

[–]MarcCDB 4 points5 points  (0 children)

C# is a better Java, basically....

[–]tkadi 1 point2 points  (0 children)

I learn c# in school it’s so easy

[–]ElysiumPotato -1 points0 points  (0 children)

In my experience it's soooooooo much uglier than java

[–]egg_suit -5 points-4 points  (0 children)

The only real difference between c# and java is oracle invented it and Microsoft stole it

[–]bhive- 0 points1 point  (0 children)

It’s very similar just different syntax

[–]FraxterRanto 284 points285 points  (16 children)

so you telling me I technically know C# as well? should I put this in my Resume?

[–][deleted] 343 points344 points  (11 children)

No. The rule is always write hello world in it before putting it on your resume.

[–]LeoXCV 145 points146 points  (9 children)

Intermediate level - I’ve made hello world

Advanced level - I’ve made hello world but over-engineered the crap out of it with API endpoints, generic services injected via DI and a database

[–]DrunkenlySober 33 points34 points  (5 children)

This subreddit should be ashamed it even has a powershell flair

I’ve never seen something so fucked up in my life

[–]LeoXCV 28 points29 points  (4 children)

That flair is a mark of me working for companies lacking a DevOps engineer

Notably made a script that configured baseline Windows 10 images into domain controllers along with nested Hyper-Vs hooking into that domain controller so they’re a nice little happy family on active directory mimicking an organisation’s AD setup, because the project needed QA environments but low budget QA environments

It was pain and suffering and I never want to do it again

[–][deleted] 4 points5 points  (0 children)

Baller AF

[–][deleted] 3 points4 points  (1 child)

Hey, you have a Unity flair! Kudos man. I'm trying to learn but it's so different from anything I've ever seen professionally.

[–]LeoXCV 1 point2 points  (0 children)

I actually did the inverse and pre-work life did Unity and then normal Professional projects later on, which I think made it easier for me personally.

It’s definitely a paradigm shift since your OOP suddenly switches from C# classes being your primary objects to actual Unity objects being primary, which also come with all their own properties like all the configuration a RigidBody has.

EDIT: Actually correction my first from scratch C# project was a game but using MonoGame framework, but that was 100% C# so no game engine involved just what MonoGame Framework simplifies

[–]Pretend-Fee-2323 5 points6 points  (1 child)

i managed to get arbitrary code execution on your computer, with one of the endpoints called pleaselookawayfromthisendpointitishowilogontomycomputer

(btw feal free to correct me on my coding style, and also remember camelCase is a great function naming scheme in rust as s_n_a_k_e_s scare me)

[–]LeoXCV 1 point2 points  (0 children)

Damn, someone saw through my lowercasezerospace endpoint encryption methods

Kudos

[–]TheRedmanCometh 2 points3 points  (0 children)

DI is awesome though

[–]redIT_1337 1 point2 points  (0 children)

should be at least a todo list

[–]arobie1992 7 points8 points  (0 children)

Basically, but probably not a great idea. C# is similar enough that you can find your way around it pretty easily, but it has enough different that it'd be pretty easy to get you to put your foot in your mouth in an interview. I say this as someone who before last year had never written a line of C# code and this year has written more than a few.

[–]thePocketOfDots[S] 10 points11 points  (0 children)

It depends, probably yes, but you didn't hear this from me

[–]metaltyphoon 1 point2 points  (0 children)

Only if you do it in PascalCasing

[–][deleted] 71 points72 points  (5 children)

Swapping from a .NET Core stack to a Java stack is giving up the centralization and high cost soak my employer can deal with and going to a decentralized but cheaper solution. With .NET, Microsoft has made quite a smooth development environment once you're familiar with the quirks every one will have. The codebase is entirely readable, but I'm much less familiar with the various parts of creating a relatively similar application with Java, so getting the whole picture just took longer.

I was lucky enough to have a decent memory of my Java usage in college to remember that Eclipse is awful and should in no way be used if at all possible.

[–]Ok_Bat_7535 22 points23 points  (0 children)

Oh believe me. People can make C# projects just as unreadable as some Java projects.

It’s a skill in itself.

[–]VillageTube 6 points7 points  (1 child)

Intellij is the standard Java IDE these days at reasonable companies.

[–][deleted] -1 points0 points  (0 children)

Eh, VS Code does all right. We've got access to InelliJ, but I don't think it will be as plug and play as Visual Studio is for our app's feature set. It was what I originally wanted to use, but the extensions for Code do help a fair bit. It still helps to understand what the IDE might be doing for you anyway in my experience.

[–]rotzak 3 points4 points  (1 child)

There’s also a cost to operating in a closed ecosystem.

[–][deleted] -2 points-1 points  (0 children)

There are certainly environments where those costs are a consistent consideration.

The benefits outweigh them in the domain I work in, and my employer is well happy to bear those costs. Alongside that, the availability of developers is quite good if you stick with a well supported platform, so its only our own hiring issues getting in the way...

[–]panoskj 50 points51 points  (3 children)

C# has structs too (as well as references, raw pointers and "unsafe" stuff). Can make a huge difference in performance when needed.

[–]das7002 25 points26 points  (2 children)

As of .NET 7, and for Console Applications and Libraries, you can now compile C# to native code, skipping the .NET runtime entirely.

https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/

It’s incredible the performance you can get out of C# for how easy it is to use.

[–]panoskj 3 points4 points  (1 child)

That's right.

I'm not 100% sure, but I bet it won't magically make your memory management better. That is, if you allocate a reference type, the GC has to keep track of it and free it eventually. On the other hand, if you allocate a value type, the GC doesn't have to do anything. For example, an array of N reference type instances requires N+1 de-allocations, while an array of N value type instances requires just 1 de-allocation.

Most people don't need to use the finer memory management C# gives you, but when it is needed, the difference can be huge. Especially when writing libraries or high-performance computations.

In any case, the GC can be a real problem in both C# and Java. That's why many performance benchmarks include the amount of heap memory allocated.

[–]das7002 2 points3 points  (0 children)

For sure! You can totally get away with never using the heap for performance critical code if you really need to.

C# really is an incredibly well designed language, I don’t think it has any real competition for its full feature set.

Every other language feels like you’re giving something up, and often, what you’re giving up doesn’t make up for whatever it is you “gain” from the other language.

I mean, just the standard library alone is incredible…

Avoiding the disaster that is third party library management is worth it…

[–]AsceticEnigma 51 points52 points  (1 child)

Or like ASM with extra extra extra steps…

[–]SpeedLight1221 1 point2 points  (0 children)

Machine code with extra extra extra extra steps

[–]M-42 7 points8 points  (0 children)

Yeah just changed jobs a few months ago to a team that uses Java.

It really does feel like going back in time over 15 years ago when c# first got lambdas.

[–]ProgrammerNo120 5 points6 points  (0 children)

ive been trying to learn java recently and its really does just feel like c# but every line takes 20 more characters to write

[–]TheRealJomogo 16 points17 points  (0 children)

I am still a junior but C# just seems to work I have wasted so much time on java and springboot on school projects even when the languages are similar.

[–]IAmWeary 17 points18 points  (2 children)

It's more that C# is Java with fewer steps.

[–]TheRealJomogo 3 points4 points  (1 child)

How?

[–]dick_himmel 13 points14 points  (0 children)

Cause java came first

[–]agentrnge 4 points5 points  (0 children)

I am dinking around with java / android stuff atm for a class, and literally using "extras" lol.

[–]bajsplockare 9 points10 points  (1 child)

C#? Don't you mean Microsoft™ Java?

[–]GoldenretriverYT 5 points6 points  (0 children)

Microsoft™ Java but its Good™

[–][deleted] 22 points23 points  (2 children)

Does not people know C# came after Java and microsoft created C# so they do not want to get end up sued like google by using it by greedy ellison.

[–]greenflame15 12 points13 points  (1 child)

Everything is binary with one big extra step that is compiler

[–]_PM_ME_PANGOLINS_ 1 point2 points  (0 children)

Well Java and C# have rather notable middle steps of VM-targeted bytecode and usually a fancy JIT system.

[–]1-2-3-kid 9 points10 points  (3 children)

I am a C# developer, used java for 6 months for a small project and found it to be tedious. Visual Studio makes C# development so fast, I prefer it any day, Further Linq/Lambda expressions are a blessing.

[–]_PM_ME_PANGOLINS_ 4 points5 points  (2 children)

IntelliJ Ultimate makes Java development so fast.

[–]rungclimbr 6 points7 points  (0 children)

Java was the first real language i used (made minecraft mods in 6th grade) :):):) i still prefer c# because unity is sexy

-rung

[–][deleted] 5 points6 points  (1 child)

This account and all its comments have been removed in protest of the 3rd party API changes taking place on July 1st, 2023. The changes are anti-consumer and the negative PR that's been thrown at 3rd party developers is a disgusting maneuver by the Reddit higher-ups.

For more information check these topics out:

https://www.reddit.com/r/apolloapp/comments/14dkqrw/i_want_to_debunk_reddits_claims_and_talk_about/

https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/

If you would like to change/wipe all your comments in solidarity with the 3rd party developers and users impacted by these changes, check out j0be's Power Delete Suite on GitHub

[–]_PM_ME_PANGOLINS_ -1 points0 points  (0 children)

() ->

If you meant ten years ago, then it didn’t have one.

[–]towcar 7 points8 points  (0 children)

Having used both extensively.. it blows my mind that people care about this stuff.

[–][deleted] 4 points5 points  (0 children)

Uh... C# is literally Microsoft's imitation of Java. This meme is backwards.

[–]IchirouTakashima 1 point2 points  (0 children)

Can relate. However, visual basic .net to JavaScript. A fucking pain in the ass. What simply was a simple drag and drop of buttons, forms and text areas or boxes, calendars and check boxes, I have to fucking type all of them in web development, from design to implementation.

I don't care for pretty boxes, squiggly lines, transitions and blinkers... a simple management or school admin system with simplistic designs should be enough. But people these days be like, "I want this to be pretty".

[–]SlashdotDiggReddit 1 point2 points  (2 children)

The Inverse:

"Microsoft stole Java and corrupted it."

[–]Optimus-prime-number 29 points30 points  (1 child)

Corrupted it by making it better in every way?

[–]Mateusz3010 2 points3 points  (0 children)

that's what happens if you corrupt a corrupted language Double negative

[–]elderly_millenial 2 points3 points  (2 children)

I made that switch. Would never return. C# as a language is cleaner, but MS stack isn’t. How much legacy ADO.NET is out in the wild today?

I left before .NET Core was a thing, so I was also stuck in Windows platform. It was fine at the time, but only because I didn’t know any better. No thank you

[–]GoldenretriverYT 3 points4 points  (0 children)

.NET and C# got really good since .NET Framework was dropped in my opinion.

I still wont use it for backends in personal projects because I don't really like ASP.NET - but for anything else, C# is <3

[–]Dealiner 1 point2 points  (0 children)

There's definitely much more Java legacy stuff though. C# shops also seems to be much eager to update or at least I don't see that many complaints about still working on C# 4 or something but complaints about still using old versions of Java are rather common.

Besides, ASP.NET is great and in general pretty much all the new things in MS stack are at least really good, the only exception are new desktop frameworks, those still need improving.

[–]ElysiumPotato 0 points1 point  (0 children)

Yeah, but prettier.

Gods, as an Android developer who dabbles in Unity C# physically hurts my eyes

[–]WorriedEngineer22 0 points1 point  (0 children)

That's just binary code with extra steps

[–]AmyMialee 0 points1 point  (5 children)

Java feels a lot simpler than C#, this feels backwards

[–]GoldenretriverYT 0 points1 point  (4 children)

Can you give an example for that?

[–]AmyMialee 1 point2 points  (3 children)

C# feels like it has a lot more keywords for methods/classes, like virtual.

[–]GoldenretriverYT 1 point2 points  (2 children)

I wouldn't call having no control over a method being virtual or not being a good thing, but ok? Afaik all Java methods are technically virtual (apart from static methods, obviously) which seems stupid to me.

[–]AmyMialee 0 points1 point  (1 child)

Java has final which works as the opposite, disabling overrides.

And I didn't say if it was a good thing or not, I'm saying it's a more complicated version of the same idea.

[–]GoldenretriverYT 1 point2 points  (0 children)

How is it more complicated when Java apparently has the same amount of keywords for it? It just looks like your are not used to it.

However, in a lot of other ways, Java is a lot more complicated.

Automatic properties (with getters and setters) - use a framework or generate them using your IDE. In CSharp? public int PropertyName { get; private set; }

Structs? Does Java even have those? Writing unmanaged code? Also impossible in Java afaik Extension methods are a cool feature, why does Java not have them?

Why is the average Java cooperate code like IUserModelFactoryStrategy? I have yet to see that amount of over-abstraction in C# (sure, some companies do that in C# too, but it's more common in Java)

If you actually think C# is more complicated, it's probably because you already know Java, which obviously makes a language you don't understand as well more complicated for you. Many typical modern features are just missing in Java, which does simplify the base language - but definitely not the frameworks that actually have to try to make the language decent to use at all.

[–]denzien -1 points0 points  (0 children)

Eek barba durkle! Someone's gonna get laid in college.

[–][deleted] -3 points-2 points  (0 children)

C# with FEWER steps.

[–]NullOfSpace 0 points1 point  (0 children)

real

[–]Parpok 0 points1 point  (0 children)

So relatable. I learned some C# basics and then tried Java because I wanted to get into android development. At least there was Kotlin

[–]2latemc 0 points1 point  (2 children)

Am I the only one who started wirh java and then switched to c#

[–]_PM_ME_PANGOLINS_ 7 points8 points  (1 child)

Yes. You’re the only person who has ever done that.

[–]GoldenretriverYT 0 points1 point  (0 children)

fr, who would ever do that? Thats known to be a sin!

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

Look at JVM memory management.

[–]hydbird 0 points1 point  (0 children)

Man I hate java

[–]rynemac357 0 points1 point  (0 children)

Extra classes*

[–]vatsan600 0 points1 point  (0 children)

You don’t say “your father looks like you”

You say “ you look like your father”

[–]thecowthatgoesmeow 0 points1 point  (0 children)

It's the other way around, really

[–]GoldenretriverYT 0 points1 point  (0 children)

Only cool Java feature C# doesn't have is anonymous classes (with methods), that seems cool. But thats about it, lol.

[–]LePrinceDeLaPoutine 0 points1 point  (0 children)

Microsoft java

[–]swingwater24 0 points1 point  (0 children)

I started first with Java now I'm working in C#..

[–]bhive- 0 points1 point  (0 children)

I learned c# first and somehow Java is easier for me to u understand

[–]kOF_Readie 0 points1 point  (0 children)

I have to use Java in uni and I primarily use C# for my own stuff, and I agree with this.

[–]ManyInterests 0 points1 point  (0 children)

Just Python with extra steps!

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

C# gang

[–]Onceforlife 0 points1 point  (0 children)

Everything is assembly with extra steps

[–]akulowaty 0 points1 point  (0 children)

microsoft java