Тёмный

Comparing C# to Java - I Code in Both. Learn about the Differences and Similarities. 

Coding With Chuck
Подписаться 5 тыс.
Просмотров 118 тыс.
50% 1

Whether you are a programmer or project manager, developers are always defending their favorite programming language. To help determine what software engineering platform will work best for your next project, Chuck explains the differences and similarities of Java language/platform and C# and .Net platform.
From syntax to performance this presentation focuses on the developer experience on both platforms!
While Java and C# have lots of similarities, there are significant differences. Anyone wanting a better view, an objective view of the 2 platforms will learn in this video. With actual code samples and humor, Chuck hits on the major points.
Check out our website at www.McCulloughAssociates.com
Chapters:
0:00 Introduction
0:27 The Slap
0:48 Philosophy
2:18 What they have in Common
2:56 A Sample Class for Both
3:33 Primitives
4:37 Type Specifiers
5:35 Operator Overloading
5:58 Functional Programming
6:33 Exceptions
7:20 Garbage Collection
8:00 Generics
8:33 LInQ
8:58 Performance
10:16 Recommendations

Наука

Опубликовано:

 

15 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 476   
@gooroomp
@gooroomp 2 года назад
As a developer who has a lot of experience in both of these languages, I believe you did a very good job in comparing the two. That said, I strongly believe if you CAN do what you want in C#, there's almost no argument that persuades you to use Java. Basically, if you have to use Java to use a certain library, by all means, do it. But if I had to choose either of these languages I would NEVER choose Java. There are so many things wrong with it (Unicode?)
@Tempest4935
@Tempest4935 2 года назад
Ya I'm not against 3rd party dependencies but I do cringe a little bit when I take one on. 😖
@bluesillybeard
@bluesillybeard 2 года назад
Generics. Java's generics are the most annoying thing in the history of the universe.
@kingigzorn7680
@kingigzorn7680 2 года назад
Done both, i love javas simplicity. Who wants to drive a Mercedes If He can just fly
@penniesshillings
@penniesshillings 2 года назад
I love Java, have used it for over 20 years. I know it inside and out. It's a terrible language... ;-(
@bluesillybeard
@bluesillybeard 2 года назад
@Jan Krynicky Yes, but 'this.equals(that)' takes second place imo
@laurence8528
@laurence8528 6 месяцев назад
why I love C#: - Async / Await - Extension Methods - Expression Bodies - Optional Params - Ref, Out Params - Auto Properties - Events, Delegates - Linq - Structs - Interop and..... string.IsNullOrEmpty(), an important feature that java lacks😆
@vert3cx373
@vert3cx373 2 года назад
C# has less boilerplate, fantastic syntactical sugar features which make coding a breeze (Once you know them), extension methods are really awesome for configuring services for application startup (IServiceCollection). The new MinimalApi makes writing API endpoints super simple and fast for simple dev testing etc. All in all, it feels like a more modern language which has matured well, unlike Java. Sorry if I ruffled some feathers but it's just my opinion. :)
@staubsauger2305
@staubsauger2305 2 года назад
Try Groovy as a "Better Java" sometime.
@pauldanielmooney
@pauldanielmooney 2 года назад
Syntactically Java is very out of date, and in my mind it always will be until it can do simple things like auto properties (adding a library like Lombok that requires IDE plugins and build alterations doesn’t count), and more advanced things like Async Await. I believe it’s advantage is that is has a good trusted ecosystem in spring, Apache commons, and a few others. I want to say Kotlin is the answer here but even that language seems to stumble in a lot of places. At least that’s how it seems with my current understanding of it.
@punsmith
@punsmith 2 года назад
@@pauldanielmooney Sadly, Kotlin will always be limited by Java itself. It simply can't solve what a mess it has become.
@victorbukowsky7496
@victorbukowsky7496 2 года назад
@@pauldanielmooney Agree with everything that was commented here, by everyone. Completely. Yeah, Java is just out of date. And it can't change that - Oracle has to support backward compatibility with everything that was made before. So it's just stuck there, with 1990s format. Yep, Lombok is nice autoprops copy, but it's not that integrated, and requires another library. Etc.
@victorbukowsky7496
@victorbukowsky7496 2 года назад
@@staubsauger2305 Oh lord, I haven't even touched on Groovy lol More learning? When do I get to actually DO in Java? lolol Java is one big chore and headache, and all these half-arsed attempts to make it human - like Maven, Gradle, Groovy, Kotlin - it's just another layer of headaches. Instead of actually giving us simple tools to BUILD - Oracle is focused on pandering to their corporate overlords.
@_FGTS
@_FGTS Год назад
the LINQ feature of C# sounds amazing. It looks like an incredible new approach to deal with list manipulation. I'm astonished.
@kazinix
@kazinix Год назад
I've been using LINQ for almost a decade now, every time I have to switch language, I see myself looking for something similar. I used Phinq in PHP, linqjs in JavaScript.
@Foxfried
@Foxfried Год назад
Stay the hell away from that. the Data layer should never be bastardized into the code layer.
@raianmr2843
@raianmr2843 Год назад
ironically linq is sorta neglected by microsoft and unoptimized af. but of course, that shouldnt be relevant to you when youre just prototyping or smth
@rodrigo-tj1gf
@rodrigo-tj1gf Год назад
Yeap, i absolutely love writing linq queries
@laughingvampire7555
@laughingvampire7555 11 месяцев назад
C# has nothing original, everything is copied from somewhere else. LINQ is just a copy from a feature from Haskell that Haskell itself copied and refined from Python.
@suleman.khalid
@suleman.khalid 2 года назад
Another different is that Java developers wear glasses, because they can't C# ;)
@norbertabone9157
@norbertabone9157 2 года назад
😀😀
@user-eg5cg3lk3e
@user-eg5cg3lk3e 10 месяцев назад
Get outta here 😂
@suleman.khalid
@suleman.khalid 10 месяцев назад
Another difference is that java methods have a higher divorce rate ... because they have constant arguments :)
@tealc-alex3149
@tealc-alex3149 7 месяцев назад
This is true, i wear glasses because i can’t C# enough
@cxfgjklihgfcvhjnknhjknvbvvcflk
@cxfgjklihgfcvhjnknhjknvbvvcflk 3 месяца назад
😂
@MarkVrankovich
@MarkVrankovich 2 года назад
C# only has two characters in its name, whereas Java has four. Obviously C# is faster to type. Java on the other hand takes up more of your life, two characters more to be precise, every time you need to mention it in an email or doc, etc... Of course, I only ever use C.
@yasirhantoush
@yasirhantoush 2 года назад
the c# reads two characters, but it actually needs 3 keyboard strokes , the c , the shift and the 3 ;p)
@bharathb4803
@bharathb4803 2 года назад
@@yasirhantoush Yes, so?
@rolandtennapel5058
@rolandtennapel5058 2 года назад
I respectfully disagree; I think C# shows more character 😁
@chowhar
@chowhar 2 года назад
C is a bit flat in comparison, but is the base and generally the more major of the two! 🎶
@MulleDK19
@MulleDK19 2 года назад
You use C? What a waste of time! I exclusively use
@supercyclone8342
@supercyclone8342 Год назад
Amazing comparison! My main language is C# and I recently learned Java and... I don't hate Java per say, but it just seems inferior to C# in every way, especially since C# is now multiplatform (though I've only ever used Windows anyway). My typical workflow relies heavily on things like properties, events, nullables, and LINQ, so whenever I use Java I'm constantly bumping into inconvenience after inconvenience. Even if they're minor, they add up to frustrate me quite a bit, so this video kind of validates those feelings lol.
@iluvsyphonfilter
@iluvsyphonfilter Год назад
Thanks for making this video, I was curious on the differences between these languages and you explained those differences very well!
@rilauats
@rilauats 2 года назад
Chuck - great work, great content. Thank you for sharing your experience, your wisdom. I really like your level-headed language comparisons. Having worked with software development for 40 yrs I cherish a valuable source when I see one. You earned my subscription after just one video.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
I appreciate that!
@tomjose4815
@tomjose4815 Год назад
This is one of the best comparison videos i have ever come across. it cleared up lots of my doubts. Thank You
@McCulloughAssociates
@McCulloughAssociates Год назад
Glad it was helpful!
@ziaulhasanhamim3931
@ziaulhasanhamim3931 2 года назад
you forget about async-await. one of the most important think that java doesn't have till now and c# was one of the first languages to introduce async-await.
@hilligans1
@hilligans1 2 года назад
We have futures in java
@yuitachibana8829
@yuitachibana8829 2 года назад
They meant the syntactic sugar comes with multitasking in c#, the syntax make asynchronous code looks like synchronous code and avoid callback hell
@Alguem387
@Alguem387 2 года назад
C# was in fact the very first to implement async await
@ImaginaryNumb3r
@ImaginaryNumb3r 2 года назад
C# will weep once Java Continuations arrive via Project Loom.
@Alguem387
@Alguem387 2 года назад
@@ImaginaryNumb3r and other hilarious jokes you can keep telling yourself
@yogibarista2818
@yogibarista2818 2 года назад
String-variable Interpolation is a nice syntax feature in C#
@ozgurugur5196
@ozgurugur5196 2 года назад
Thank God for the competition created by Java. Otherwise, there would not be such a shining and powerfull language called c#. For more than 20 years I have been coming across such comparisons. In the beginning, it was "c vs java". C# takes features from java (vm, open-source philosophy), java takes features from kotlin (records) , c# (lambdas, virtual-threads), javascript (promises, declarative programming, reactive)(and golang latest version supports generics at last). The thing you have chosen is not only the language itself, it 's also the open-source community behind the scenes. Long live open-source, even the companies have been funding foundations to drive the open-source community.
@IHaveYourMilk
@IHaveYourMilk 2 года назад
Love your view on this, very well put.
@kazinix
@kazinix Год назад
Makes me happy when a language adopts features from another language.
@RogueTravel
@RogueTravel Год назад
Kotlin/Swift/Typescript front ends with a C# backend, and I have to say, languages are in a good place at the moment. All of the native front ends do a great job of not getting in the way while providing great developer experiences. C# and .NET are great as well, with batteries included. If I had to use the JVM, I would go with Kotlin over Java.
@saarcfashion1196
@saarcfashion1196 2 года назад
In 2008, I got the option to choose either PHP or Dotnet for my career path. But, now I am proudly saying that it was the best decision of my life forever. My current goal is to bag a C# Web Application Developer job in the USA, and I hope very soon will succeed.
@G5STU
@G5STU Год назад
i program in php all day for web and C# in the evening for personal desktop apps, I'm also using C++ for some heavy lifting. Programmers should see languages at tools, you don't pick just one to do everything, the right tool for the job. I don't care what language i'm coding in, so long as it's easiest way to get the job done. It's all just code, some languages are just better at certain things.
@cyrusmagnus
@cyrusmagnus 2 года назад
Thank you for this Chuck. As someone trained on Java and C++ I'd been wondering for some time what exactly the difference was in C#. After watching this and your C++ vs C# video, I now have a much better appreciation of the differences. Going to see if you've made any videos on Kotlin now, as I'm learning that language on the side for funsies atm. Cheers.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Thanks!
@IvanRandomDude
@IvanRandomDude 2 года назад
Generics not accepting primitive types was one of the things I was shocked by when I started using Java.
@ryanisthewind
@ryanisthewind 2 года назад
I'm still waiting for the time I can use Generics. I didn't see any use case for them🥲
@NOTturke
@NOTturke 2 года назад
This isn’t true, you can use the wrapper classes
@nallid7357
@nallid7357 2 года назад
@@NOTturke wrapper classes are classes, not primitive types. Integer and int are not the same thing.
@NOTturke
@NOTturke 2 года назад
@Jan Krynicky true, it is pretty annoying to have to have an entire object with methods just for a single value
@thePrzemko17
@thePrzemko17 2 года назад
4:55 C# dynamic is not a tuple. its a proper dynamic type, like a dynamic type in java script.
@obeid_s
@obeid_s 2 года назад
In Java i could not access Memory Mapped Files, also there is no unsigned, I tried c# and it was super good. Thank you.
@adhamabdelwahab
@adhamabdelwahab 10 месяцев назад
Thanks for the video Chuck. I'm starting a new position at work and have a flexible manager willing to put me on teams that either work with java or C#. I don't have much industry experience or experience with those languges outside of a few projects. This video helped me understand things differently and has me leaning towards joining the C# developers more than I already was. Thanks again
@Lucas-mo1ko
@Lucas-mo1ko Год назад
I believe in C# supremacy ! It feels more modern and Microsoft is upgrading it a lot since NET5 open-source. Anyway, I'll always respect Java and we'll still see it around for a while, but working with C# and Typescript for frontend (also Microsoft) is a great combination!
@EruWan_Ernest
@EruWan_Ernest 2 года назад
As non programmer I enjoyed this content!
@MrAikien
@MrAikien 2 года назад
Very informative. Thanks! 😊👌👍
@GadOcansey
@GadOcansey Год назад
The best video on this war between C# and Java.
@jordanweir7187
@jordanweir7187 2 года назад
This is a great comparison dude thanks, very informative
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Thanks!
@ramprasanthudhayabaskar8073
@ramprasanthudhayabaskar8073 2 года назад
Wow, nice video..!! Best comparison I ever saw.. Thank you for such a great content..
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Glad you liked it!
@barionlp
@barionlp 23 дня назад
you forgot that C# gives you the option to write low level code. So i can just write my Application using all of C#s benefits and only write the performance critical parts in a unsafe way without having to write them in a whole other language. I also like how C# adopts so many functional features, combining the best of both worlds
@lx2222x
@lx2222x 6 дней назад
Also people forget how great C# interops with native libraries. Java on the other side often requires some kind of overhead
@sirnigelcogs
@sirnigelcogs Год назад
A very good job at explaining things.
@jeanahollings
@jeanahollings 9 месяцев назад
Thank you so much! My only comment is: you didn't mention database integration. I'm still a bit of a programmer newb but all my coder friends are clear: if you're going to build an application that is tied a database, go with C#. And I can't argue with that. I've done the integration in Java and it is annoying but I've seen it in C# and it was seamless.
@Darietable
@Darietable Месяц назад
Idk man, with spring boot and hibernate it's never been easier
@protox4
@protox4 2 года назад
Generic classes being generated for each generic type doesn't just matter for reflection. It also matters for performance and static fields. Java uses type erasure, which means generics are fake. Every value type is boxed to an object. C# uses real generics where value types are not boxed and can be accessed directly. C# generics are closer to C++ templates, but not exactly the same.
@fnamelname9077
@fnamelname9077 2 года назад
Yes, but C# doesn't use type-erasure, which inflates application sizes.
@protox4
@protox4 2 года назад
@@fnamelname9077 That's only true for AOT compiled applications, which most are not (native AOT is still in preview). The JIT creates the types on the fly at runtime so the application size can remain small. That's part of why AOT uses stripping to remove unused code to reduce application size.
@fnamelname9077
@fnamelname9077 2 года назад
@@protox4 True, but that's just changing a memory pressure for a computation pressure.
@protox4
@protox4 2 года назад
@@fnamelname9077 Well that's just the nature of software. There are always trade-offs.
@fnamelname9077
@fnamelname9077 2 года назад
@@protox4 One of the tradeoffs, is reducing the efficiency of coding in order to obtain the same computational result for a lower operating cost.
@johnforde7735
@johnforde7735 2 года назад
I would be interested on you take on Swift. Maybe in comparison to C#, which is relatively close.
@Benexdrake
@Benexdrake 2 года назад
learning C# for over 2 Years now and im loving it, for me, it is better as Java.
@MrBloodsucker27
@MrBloodsucker27 2 года назад
This method works perfectly .. thanks for sharing ;)
@alexclark6777
@alexclark6777 2 года назад
Microsoft sacrificed backwards compatibility by implementing generics from the ground up the right way. Java maintained backward compatibility by utilizing type erasure. However, there are more implications than just Reflection. The vast majority of generic programming surrounds the collection types, which use an array as their backing store, and the difference is particularly evident for primitive value types. If you wanted a Java List and the bools have to be converted to objects (boxed), they're taking significantly more space on the heap and getting scattered (your array now holds references to other heap locations). A .NET List uses an actual concrete array of bool behind the scenes, should hold the data in a contiguous block of memory, and doesn't suffer from the same inefficiencies.
@alexclark6777
@alexclark6777 2 года назад
@@ThiagoPagogna Java programs don't run for long enough to cause a BSOD, they consume all system memory and freeze up long before that happens. Cope.
@MulleDK19
@MulleDK19 2 года назад
"should hold the data in a contiguous block of memory" And does.
@Grimlock1979
@Grimlock1979 2 года назад
The way Java handles generics has been a frustrating experience for me for many years.
@alessioantinoro5713
@alessioantinoro5713 2 года назад
No worries, Oracle is re-working on generics, maybe in 1-2 years it will be less frustrating
@cod3r1337
@cod3r1337 2 года назад
@@alessioantinoro5713 I'm afraid you are being overly optimistic on the timeline. Project Valhalla has yet to finish even "phase 1" (value types), and from there it's still a long way towards specialized generics. An inofficial estimate I've read on that is around 2025. And even that sounds optimistic to me.
@alessioantinoro5713
@alessioantinoro5713 2 года назад
@@cod3r1337 🤷
@ChrisBrown-dn3tf
@ChrisBrown-dn3tf 2 года назад
I like java because it's simple. When I program in C++, it looks a lot like java, and is easier to read in my opinion than C++ code I read on the internet that makes use of all C++'s special features.
@tatoElpaisa
@tatoElpaisa Год назад
c++ is diferente from C#
@matterb6049
@matterb6049 2 года назад
Both are good, for me it depends on what I'm doing, but I do lean toward java, thers a Order about it that helps me remember more of my code for those big projects
@TheBoxyBear
@TheBoxyBear 2 года назад
Small clarification: Both Java and C# offer features through classes, but C# simply offers syntax aliases for these classes, which are sometimes structs. Like with the nullable example, the question mark is removed in CL and becomes a reference to the generic Nullable struct. You may use the struct like any other and the values are interchangable with variables defined using the nullable syntax, but IDEs may detect the use of the struct and suggest the designated syntax. This also extends to LINQ for which the query syntax shown is an alias for a chain of LINQ extension method calls. This doesn't mean the lack of extension methods is preventing Java from having something comparabie to LINQ. In reality, you could always use method calls inside method calls just like you can in C# through the static Enumerable class. The reason LINQ is based on extension methods in the first place was to simplify the syntax when calling the methods. The query syntax was only added later to further, making it ressemble SQL. As for checked exceptions, although there is no way to signal potential exceptions that will have an impact on the assembly, C# does support signaling of potential exceptions through XML documentation that references the assembly. This allows for an IDE to read the documentation file and show context-sensitive documentation including possible exception at the programmer's request.
@kazinix
@kazinix Год назад
I love syntactic sugar, makes it easier to write and read the codes.
@victorbukowsky7496
@victorbukowsky7496 2 года назад
lol this is some thick material. Awesome comparison. I work in both, and I greatly greatly prefer C# and .NET. I could go on for hours why - it's just everything is already packaged for you, from a single source really - Microsoft. In Java, you, the programmer, has to sit there and configure third-party tools - it's a major nightmare! Version matching is horrendous. Yes, there is Maven, etc. But it's another thing you have to waste time and effort on, just to make it work! And any issues with that - you are on your own, good luck lol!
@RustedCroaker
@RustedCroaker Год назад
"a single source really - Microsoft" That exactly what kills C# for me. Being dependent on a single source is never a good idea. Especially if that source is Microsoft.
@saintinel
@saintinel Год назад
C# is pure comfort, compared to Java... And also MS Visual Studio is the ultimate best editor by far! I really wouldn't want to use anything else ever again.
@martinsandor707
@martinsandor707 11 месяцев назад
Visual Studio does have some very comfortable features, but to me it felt cumbersome how many times it tried to incorrectly predict what I wanted to write. I could probably tweak it if I wanted to spend time with it, but I mainly use Java and IntelliJ has to be my #1 choice, i never had problems like I do with VS.
@shadmansudipto7287
@shadmansudipto7287 11 месяцев назад
@@martinsandor707 bruh. You're talking about intellicode which is a copilot assistant. Just turn it off if you don't like it. "I don't like this car because there was a pack of bad tasting chocolates in the glove box".
@zaspalia
@zaspalia Месяц назад
@@martinsandor707Jetbrains makes Rider for C# which is almost the exact same IDE as intelliJ. You’d feel right at home with it.
@billbez7465
@billbez7465 Год назад
Well done. Thank you
@andrewnorris5415
@andrewnorris5415 2 года назад
I got a book out of the library on Java once. The librarian said she had been there and highly recommended it.
@andrewfandy8178
@andrewfandy8178 7 дней назад
Thanks for the video sir, great explanation!, i want to move into C# .NET environment from Java, and found this video and i could get an overview about C# development
@Android-17
@Android-17 2 года назад
What an excellent video👌
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Glad you liked it!
@mbip2014
@mbip2014 2 года назад
Please post a video between Java vs C# vs Python. It's my humble request.
@jolodejesus
@jolodejesus 2 года назад
Great video, could you recommend a beginner book for both Java & C#? Thanks!
@McCulloughAssociates
@McCulloughAssociates 2 года назад
There are so many books for each. Everyone has a different learning style, so hard to recommend a specific book. Take a look at my intro C# playlist also. ru-vid.com/group/PLXd94bZTzZ-QaMgLp41ZUb_w0sjLBGjUp I have a lot more content coming soon!
@jespersahnerpedersen
@jespersahnerpedersen 2 года назад
Miss anonymous classes in C# which has been in Java from the beginning. C# supports anonymous methods (delegates and lambda expressions) and types (properties) but for some reason not full classes.
@eugenpaval
@eugenpaval 2 года назад
Anonymous classes are supported in C# albeit most programmers will use them just to bunch together a set of properties. However an astute observer may notice that a property can be in fact a lambda. These classes are extremely useful in Linq, especially in fluent form when results from previous method calls are chained in the next call as anonymous objects.
@sachinkumarbadiger3541
@sachinkumarbadiger3541 10 месяцев назад
@ 9:00 the background music scared me! Lol.. I was watching it late night with my headphones on, suddenly the bass note goes bwooooooon! very useful information sir.. thanks for sharing.
@mohammadalaaelghamry8010
@mohammadalaaelghamry8010 7 месяцев назад
Great video, thank you.
@McCulloughAssociates
@McCulloughAssociates 6 месяцев назад
Glad you liked it!
@samsonmayeem8409
@samsonmayeem8409 2 года назад
Having to be a ‘soft’ engineer, this is what I realized. From a C/C++ bg I moved to php and C# in a month for some projects, after a year I started Java and what exactly what you say now is what I got to know after .net5 was being realized. What I can simply say is that Csharp is clean Java.
@DevlogBill
@DevlogBill Год назад
I know this is probably a horrible analogy, but it almost feels like when you compare C# and Java. It sounds like the same arguments the C and C++ camps debate over. But to be honest? If I had to choose, I think I would go with C# and .NET for the simple fact everything you need is all together under the .NET framework. Java feels all over the place. Don't get me wrong? I like Java as well; they feel like the same language even though they aren't. Basically, finding learning material for C# seems to be so far easier to find in comparison to Java. For example, for Java to set up my environment was such a difficult task. I had to download from Oracle I think they call it an SDK. Next, I forgot what they call it I had to download some file. finally, I downloaded IntelliJ which is a cool IDE and finally when I tried to run Java on VSCode, my code wouldn't run. I found the C# ecosystem a little bit easier to find material to learn from. Also, there are different versions of Java which isn't recommended to use? I found this confusing. For example, what is Java FX? With C# I downloaded Visual Studio and I quickly found lots of material for how to get started and had an easier time figuring things out. At the moment I stopped this, and I am purely focused on JavaScript. But after I learned React, I will pick up most likely Java because of the huge job market. I am in NYC, and I can tell you that from indeed.com there were only 237 jobs post for C# and .NET and over 1,227 jobs post for Java. Despite what my personal feelings are if you want to find your first job you have to go where everyone fishing to catch fish. Sorry for the horrible analogies but I hope you get the point. This is from a newbie's perspective I am not a professional. This was my struggle as a newbie so far. Also, I would like to thank everyone for providing me with such insightful advice throughout my learning path. It has given me much needed guidance throughout these past couple of months.
@Nimitz_oceo
@Nimitz_oceo Год назад
Hey you should have warned me… That slap got me by surprise.
@JojOatXGME
@JojOatXGME 2 года назад
Is your benchmark with our without warm-up? (That the JVM is slow before warm-up would not be that surprising, I think.)
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Hi, great question. Ran the code just as it appears. However, since the code iterates thousands of loops, the respective vm''s "warmed up." I also ran the C# code marked as *unsafe* which disables the runtime safety checks. It did not make a huge difference. In order to _warm up_ the VM, I think one would have to write an additional layer to run the code shown several times within a single execution. Homework!
@Speiger
@Speiger 2 года назад
@@McCulloughAssociates Did you use tools like JMH which has warmup included as a separate feature. It would be interesting to see how quick each VM is when they had warmups included.
@jsgovind
@jsgovind 2 года назад
Newer languages stand on the shoulders of the great languages that preceded them. Java is great and we would not be here in software programming without Java. There would definitely be no C#. Microsoft took a lot of ideas from Java and added their own stuff to make it better and that's how C# was born. Initially, the languages were very similar but they are quite different now because of the effort put into developing it by Microsoft. It doesn't feel like there was enough effort and innovation put into the language after Java gained popularity. For this reason, Java feels quite outdated to me despite being a great language.
@fnamelname9077
@fnamelname9077 2 года назад
The only feature that Oracle cares about is backwards compatibility. The newest JVM will still run java applications from a lifetime ago. (Sometimes re-configuration is required.) If that wasn't true, Java would already have moved beyond type-erasure. For that matter, look at how long Lombok has been around, before Oracle added records to java.
@fnamelname9077
@fnamelname9077 2 года назад
@Jan Krynicky Java's highly-regular syntax is one of its strengths. It's easy to parse - which is why it has such a rich ecosystem of automatic code-generating tools, why it's so easy for syntax-highlighters and debuggers to interpret, why it's always had great linting support. And more than anything - why it's so easy to work on collaboratively, at scale.
@fnamelname9077
@fnamelname9077 2 года назад
​@Jan Krynicky That doesn't make any sense. The JVM is powerful and useful, but Java as a language is a value unto itself. The greatest strength of "scripting" languages are that they "just run" - usually incorrectly. But they protect small minds from the psychic violence of being able to tell WTF they've programmed and how incorrect it is.
@rolandtennapel5058
@rolandtennapel5058 2 года назад
C# allows C++ inside the code (with the proper compiler settings). I prefer C# over Java, and recently played around with Kotlin for the first time (Android relies on it heavily). They both work, but I found C# just prettier, feels better, makes more sense to me. Java feels like it's somewhere between C++ and C# and with all the 3rd party libraries, I often find myself lost in the maze of different (and often terrible) naming conventions and bad documentation. Kotlin doesn't have that problem (as much), but that's probably for the same reason C# doesn't have that problem (as much); A big and solid enough foundation, support and use by others for the time and effort put into making great documentation. I'm not against Java by any means, but it just doesn't work for me 😅
@jongeduard
@jongeduard Год назад
WHAT?? C++ inside the code? Who ever made you believe that? You probably just mean unsafe programming with pointers, however that's still far from C and C++. And it's not even a real subset of these languages, since there are multiple fundamental differences as well.
@rolandtennapel5058
@rolandtennapel5058 Год назад
@@jongeduard experience made me believe that 🤣
@jongeduard
@jongeduard Год назад
@@rolandtennapel5058 Well then you need some more experience, because there are fundamental differences. 😂😂
@denis.akopyan
@denis.akopyan Год назад
This is the first Java v C# video that is up to date, and does a wonderful comparison of the two languages. Too bad it doesn't mention async await.
@McCulloughAssociates
@McCulloughAssociates Год назад
What Does async & await Really Do in C#? Learn all about Async Await in C# ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uhNVM_7CXu4.html
@Longmanrus
@Longmanrus Год назад
Or ExecutorService class and Future Interface in java
@stanislavmozolevskiy8346
@stanislavmozolevskiy8346 Год назад
This video is actually pretty good and informational. I wish it was a little bit more entertainment. You should consider changing background and add couple of modern jokes. Otherwise, definitely subscribe and like!
@bigbilly29
@bigbilly29 Месяц назад
Thanks Chuck
@McCulloughAssociates
@McCulloughAssociates Месяц назад
You are very welcome!
@_b001
@_b001 2 года назад
For sane and comfy ecosystem: c# For more jobs: Java.
@TochukwuVictor-qe4xd
@TochukwuVictor-qe4xd 2 месяца назад
I go with Java... I need that job
@ZeryusXD
@ZeryusXD 2 года назад
Don't get worried if people say one language is better than the other. Learn whatever language that is most in demand in your area and after you land a job and gather enough experience and knowledge you can easily jump to any other language as you please
@hanswoast7
@hanswoast7 Год назад
Pro tip: Start with BrainFuck ... then become a barista :D
@eng.wandeson
@eng.wandeson 2 года назад
amazing, very good!
@torrvic1156
@torrvic1156 2 года назад
Thank you so much for interesting video! You approved that I made right choice when I started to learn C# and not Java or JavaScript (they said it’s easier!). I like how strict C# is and how convenient Visual Studio is. Just a simple opinion of me being noob. Guys! Can you tell me if it’s worth it to learn WPF nowadays?
@alexbarac
@alexbarac 2 года назад
I guess you could try it to get a hang of using the MVVM design pattern, which is commonly used in mobile development with Xamarin or MAUI.
@cmbuffa
@cmbuffa 2 года назад
just learn some frontend framework + .NET in the back, there are tons of work for fullstack developers for example Angular + .NET . Of course you can learn Blazor for example and stay in full .NET ecosystem, but I would recomend you to learn some javascript framework for the frontend as well (Angular, React, etc), and answering your question I wouldn't learn WPF
@miansherry6453
@miansherry6453 2 года назад
Superb.....
@L1ghtOn3
@L1ghtOn3 2 года назад
If It wasn't for Java I probably would have gave up programming as I hated C at Uni. Then Java doing android games got me interested in game engines so Unity and C# never looked back since! A sprinkle of Html/css/js, tiny bit of python but don't get the hype and I use some C++/Blueprints on UE4/5, but C# is my fav language...so far will take something special to beat C# for me anyway. ✌
@FilipCordas
@FilipCordas 2 года назад
Python is the worst language, it's like a worst version of Javascript and Javascript has gotten much better in recent years. The whole point of the language is to be needlessly complicated so academic types can pretend they are smarter then everyone because they write unreadable code.
@L1ghtOn3
@L1ghtOn3 2 года назад
@@FilipCordas I agree JS has gotten better especially after ES5/6, I like flow but prefer Typescript obviously coming from C/C++/Java/C# background. I made a Django ecommerce project and I just did not get where things were coming from and I just felt why do people Love Python? Because it has less code? Ì think as well def__init__(self) I just don't think is very intuitive coming from a different language, not a fan of looking at __init__ calling a function def and having(self). There are parts of Python I like others I dont, Var everywhere can lead to problems fast and Django I just can't see me using it again, I did however like the built in admin. I really have yet to come across my no.1 server side framework. I'm toying with Express, made some simple asp. Net sites nothing large. I have done some simple php stuff too but not yet full done a full laravel project, I will after express. Ive read some Golang its interesting. I might even do a Spring project as well. ROR I just feel it will be a mix of Python/JS, could be wrong and might try that as well, but my main thing is games so only do web now and again mobile not so much anymore. But yeah I hear you with Python, the scripters love it fir automation on Unix systems along with bash. Thats prob why its popular plus its recommended as starting language and a lot never leave it.
@DevlogBill
@DevlogBill 2 года назад
Hi McCullough, I know Java and C# are both OOP languages but the language I am learning at the moment JavaScript isn't? JavaScript is prototypically written. I find this very confusing. What exactly is prototypical? Would this hinder my learning or understanding of what real OOP is in comparison to Java or C#? Which is real OOP? I am at the stage where I understand the fundamentals and I am trying to learn more advance topics with JavaScript like recursive functions and gain a better understanding of pure functions versus class-based functions. Eventually I will migrate to either Java or C# for a back-end language. I am trying to learn JavaScript on a deep level so that I am able to better understand other languages with better ease when I move onto the next one. Or would it be best if I gained a deeper knowledge of languages like C# and Java versus learning from a prototypical language like JavaScript since Java and C# are true OOP languages? What would be your recommendations? Thanks McCullough most appreciative.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Great question. But the answer is a little tough to elaborate in a comment! For basic stuff like loops, conditionals and functions, conceptually similar. I think strongly typed vs untyped JavaScript is as big a hump as perhaps the object oriented features. Remember, ultimately everything executes machine code using memory, cpu, and IO. I have several videos on SOLID design- take a look. They might shine some light on OOP concepts
@DevlogBill
@DevlogBill 2 года назад
@@McCulloughAssociates OK, I will check out your videos on solid design. I think I may have heard of solid design with C#, sounds interesting, thank you for the direction.
@1234567mrbob
@1234567mrbob 2 года назад
Do you have a video comparing Java or C# to Delphi?
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Sorry, no
@calvinkoay1939
@calvinkoay1939 2 года назад
I am a C# fan. Easy to learn syntaxes. Programmers are well 'spoonfeeded' with built-in algorithms and data structures through its rich libraries, which helps speed up function implementations of the app.
@kevinstefanov2841
@kevinstefanov2841 2 года назад
which also results in the programmers becoming code monkeys rather than actual software engineers xD
@bharathb4803
@bharathb4803 2 года назад
As the world moves to quick implementation, it is better to "package" the backbones and focus on solving business problem!
@quelqunderandom6143
@quelqunderandom6143 2 года назад
@@kevinstefanov2841 programming is just assembling legos, some like to do it piece by piece not using anything prefabricated, others wants to make it fast. Thinking of programmers becoming "code monkeys" because they use stuff that has been normalized and simplified to make debugging and writing efficient and readable code more easy is as stupid as saying "people nowadays are stupid prefab users, back in the days I would have built my pc entirely myself"
@kevinstefanov2841
@kevinstefanov2841 2 года назад
@@quelqunderandom6143 and how is that stupid? that's literally what engineering is about - building stuff yourself from scratch. They can call themselves anything they want but not software ENGINEERS if all they do is use prefabricated ready-to-use bs lol
@quelqunderandom6143
@quelqunderandom6143 2 года назад
@@kevinstefanov2841 then go ahead and build your own computer from bottom up, component by component since you are an engineer. Elitism is idiotic, of course as things go on we are gonna move away from low level code, because there is no real need for it 90% of the time
@StandardLoop
@StandardLoop 6 дней назад
Great video
@DevlogBill
@DevlogBill 2 года назад
Your video helped narrow it down a bit more, thank you. I never touched C# but I played with Java for 3 weeks. At the moment I am 4 months into learning JavaScript. I have time to think about this but I figured in 8 to 12 months from now I would like to learn either C# or Java. From what you mentioned in this video could it be said that Java is light weight where C# is overly complex? My end goal is to learn one of these languages for backend and mobile. But I don’t want to spend years learning to many technologies or something overly complex, what is your opinion? Thank-you.
@vd3598
@vd3598 2 года назад
In my opinion, C# has more features built in, sure. But it does not make it more complex. Moreover, in professional Java development you will likely search for them, but it will be then some third party package implementation or your own boilerplate or even there will be no substitute. You just have more possibilities built in, but core is of the same complexity. Problem is different - I personally like C# much more but there more jobs on Java usually)
@victorbukowsky7496
@victorbukowsky7496 2 года назад
If I had to start learning a full language again, from scratch - I would go with C#. So many reasons why! Documentation on C# is FANTASTIC - Microsoft supported official doc.Microsoft site is just everything you could dream of. Visual Studio has all the reference information already built into it - you can quickly look up classes, interfaces and methods you are pulling, directly from within VS. Vast majority of C# programmers are American/Western, so there is massive amount of English speaking forums, and help. While Java is dominated by Indian guys, and so you won't find any good forums in english, at all lol Everything is 3rd party in Java - literally NO documentation, of any sort lolol Maybe some support on the CURRENT versions only, but anything 1-2 years older+, you are totally on your own. Go with C#, if you are in doubt. Javascript by the way, might give you incorrect perception of real programming - JS is not really a full language. So I would advise to quickly move into a good enterprise language, or you might get wrong ideas. Cheers, GL
@DevlogBill
@DevlogBill 2 года назад
@@victorbukowsky7496 I really appreciate the wisdom. Also, documentation is very important I noticed, perfect example React has really good documentation. Originally I was thinking about Vue but a lot of the documentation is decent. I felt React had better documentation which is why I decided to use this library. Also, I see where your going with learning JavaScript, its a complicated language. Class system is prototypical? it isn't like Java or C#, a class is a class. At the moment I had learned the fundamentals and I am learning to work with the DOM now. Once I have a handle on the DOM, CSS- flex-box, and high array functions. I will move onto React. After I have a good handle on React. Finally I will choose C#. Just want to make sure I know the tool kit well before adopting another tool set. But I appreciate your invaluable insight it is much appreciated. I am strongly considering C#. I will revue the documentation for C#, thank you once again.
@victorbukowsky7496
@victorbukowsky7496 2 года назад
@@DevlogBill yes, classes in Javascript are just syntactic sugar - meaning they just look like classes, but aren't'. For many reason, because there is no even compilation in Javascript anyway, it's all just interpreted runtime. DOM is great - this your foundation, for entire front end. What DOM really is just the browser object, that you are allowed to work with, using Javascript. But DOM is just an object, written in C++ or Swift for Apple or whatever a particular browser is written in. React - I would advise to wait with it. I know it, it's pretty confusing. If you want to learn front end framework - go with Angular, you won't miss out on that. Much better choice than React. Yes, React is hot, but it's weird, and has very limited niche - it's for highly reactive quick websites. You shouldn't clog your mind with that stuff right now. My advise - finish up with Javascript, maybe go into Angular, and then quickly move into C#. This is where the real programming is, and REAL MONEY is. Job market for C# is very hot, specially in the USA, Canada, etc. I don't know where you are. Skip Vue as well, don't waste time on it. It's junk anyway, I kinda know it - just skip it. Good luck, friend! lol you have a quite a road ahead of you, but it's massively fun. I enjoyed my trip. And money is ridiculous lol Plus freelancing/consulting possibility down the road.
@DevlogBill
@DevlogBill 2 года назад
@@victorbukowsky7496 I really appreciate your insight, you give a different perspective on things. What I think is confusing with React is JSX. It looks like JavaScript with HTML plugged into the code break. I hear from some developers that you could learn JSX and React first then jump into the fundamentals. But me personally? I figured it would be much smarter to get a strong grasp on the fundamentals since these libraries and frameworks are constructed for JavaScript. I will begin a framework around mid-May. What is the best approach to learn Angular? I believe the best approach is to take the entire framework Angular and learn the syntax first. Next learn about the modules and components next. What was your approach with learning Angular? Today I will download the documentation and visit the website to gain a better understanding of Angular. Also, I live in NYC so there is a strong market for C#, JavaScript, Java, etc. etc. When I check indeed I see jobs for C# but I keep on running into so many jobs for Java. But I noticed something. Most of those jobs from what it looks like I am not sure but it seems they are looking for people to update their back-end or maintain it. I don't see anything mentioned about creating new products using Java. Also, I downloaded some plugins for C# into my visual studio code, soon I will look into what is C#.
@RiversJ
@RiversJ 9 месяцев назад
You Can make pretty blazing fast applications in C#, but it's no magic bullet you'll need to put in the same effort into the code and algorithms as you would in a lower level language to achieve it.
@kirkshammett94
@kirkshammett94 Год назад
I’m a complete beginner and about to start school for a bachelors in software engineering. I have the option to choose a Java or c# route. Anyone wanna help me on what to choose? I’m so torn about which one!
@McCulloughAssociates
@McCulloughAssociates Год назад
Either. Learn both, and c++. The language isn’t the issue. Languages come and go. Be above it.
@nelsonthekinger
@nelsonthekinger 2 года назад
Very cool video
@bariole
@bariole 2 года назад
Sun's Java, like the referent one, has been running generational GC since late nineties. Technically speaking, GC is not mandatory part of JVM, and varius JVM implementations have completly different GC algorithms at any point of time. Being "generational" is also not a significat benefit or a failure, as implementation details are far more important than "generational", "copy", "segmented", "precise", "stop-the-world", "realtime" or whatever else comes.. Also for running server code, the most important aspect of GC, is ability of allocator to reuse unused "holes" within memoryspace as not using those leads to memory leak because of fragmentation. A classic C problem. The remedy for that is usually "copy collector", or in modern times, segmented one. Many "generational" GC algorithms are often also "copy collectors", but they don't have to be.
@iXPilot
@iXPilot 2 года назад
I have a feeling, that Chuck maybe was confused by G1GC because it is complicated and it was in development for a very long time, or maybe by J2ME due to it's difference in memory management or maybe by difference between "server" and "desktop" versions of JIT compilers (I actually don't know where else that "desktop" idea could came from)... But anyway, this part of the video could be better: I work with Java and I see evolution of the GCs: first it was CMS, then G1GC and now Shenandoah so I'm curious how it's going in the .Net world, especially after seeing the failure of Go's GCs, but eh...
@dsuess
@dsuess 8 месяцев назад
C# > Java (oops forgot.. subjective warning applied)
@distant6606
@distant6606 2 года назад
im pretty sure they ve added records in later versions of the jdk
@MarcLucksch
@MarcLucksch 2 года назад
I am really missing async/await in Java
@majahanson311
@majahanson311 3 месяца назад
If a developer asked me which the learn, one of my first questions would be what kinds of companies do you want to work for? If you want to work on line of business apps in established companies, C#. If you want to work in west coast startups or big tech, Java. I definitely like the C# language and tool stack better, but because C# started out life as Windows-dependent, Java ended up dominant in cultures that didn’t want to depend on Windows. Thankfully the dependency went away, but the inertia from that history remains
@HollowKrin
@HollowKrin Год назад
Kotlin worth to be compared too! It's very similar to both of them.
@mahkhi7154
@mahkhi7154 2 года назад
Java was designed for Internet Applets. The Windows Team wanted it for Business Apps. It catches errors better than C++.
@osanbrazil999
@osanbrazil999 11 месяцев назад
The funny thing is all that semantic abstraction turns out to be just bytes that were put in memory in a logical arrangement wich are sequentially read by the CPU wich reacts to them in a certain manner depending on their values and, in turn, outputs signals in certain ways as to control devices such as video cards, sound cards etc. so that we can see or hear the result of all that and use it to our advantage. LOL.
@ITrustInDog
@ITrustInDog 2 года назад
Java doesn’t support unsigned numeric types which can be a rather significant omission depending on the application requirements
@lufenmartofilia5804
@lufenmartofilia5804 6 месяцев назад
To be honest, yes it's not buildt in, but you can easily get them using an "extended" std library such as Guava or Apache Commons
@kamilziemian995
@kamilziemian995 2 года назад
Good video.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Glad you enjoyed it!
@freecash3474
@freecash3474 Месяц назад
thank you ton
@McCulloughAssociates
@McCulloughAssociates Месяц назад
Most welcome!
@CouchPotatoWizard
@CouchPotatoWizard 2 года назад
I wouldn't mind a deep explanation of checked exceptions and why they are an anti pattern.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Think of it this way - exceptions (c++) replaced return codes. Return codes required each function on the call stack between the error and the handler to recognize and propagate the error. Lots of points of failure. Exceptions allow the thrower and the catcher to be the only code to be exception aware - everything else is exception illiterate. Forcing each method to declare a throw puts us back into the return code paradigm. In practice, error conditions are usually considered in later iterations. An error detection would occur in lower level code whilst handling in application layer code. One would have to modify all of the code inbetween with the throw declarations. Take HttpServlet as an example. The doXxx methods all throw Servlet and IO exceptions. A subclass probably invokes other methods that might throw SQL exceptions. The override can only throw the declared exceptions. Many developers make the mistake of catching and dumping the SQL exception. The right answer is to catch and rethrow one of the declared exceptions or runtime exception. This is just more code where mistakes can be made. If the exception were just a runtime (unchecked) to start with, maintenance would be much easier because the middle code wouldn't have to deal with it. This is why the DispatcherServlet in Spring catches checked exceptions and rethrows runtime exceptions - so that the application code doesn't have to get boxed into throw decls. Stroustrup cites a similar scenario to justify the change in C++ 11 to have the compiler ignore exception declarations. It looked good on paper, but in reality, exception declarations on function signatures caused more harm than good.
@Android-17
@Android-17 2 года назад
@@McCulloughAssociates wow. Thanks!
@eugenpaval
@eugenpaval 2 года назад
@@McCulloughAssociates great explanation! I recall the war between proponents and opponents of checked exceptions when they were introduced
@eduardoconcha6714
@eduardoconcha6714 7 месяцев назад
No se trata si uno es mejor que el otro, se trata que si es empleable una persona que sabe del lenguaje... al final todo se reduce a la empleabilidad, si existe o no trabajo....
@Qrzychu92
@Qrzychu92 2 года назад
Great video, but there is one thing missing here - comparing the project structure. In modern C# you have 5 lines in a csproj for, and you already are able to build, run and debug the program both by running "dotnet build" command, and in Visual studio. For Java, at least in templates, it's by far way more complicated. First of of all, you need to know me syntax, groovy (while everyone knows basic XML). Secondly, you cannot use javac, if you want to have any maven dependency, you need Gradle to compile. Please, correct me if I'm wrong, but I tried to replicate few programs in Java to compare them myself and got stuck at the setup part - I just wanted single Java file with ability to add dependencies and to be able to F5 debug in InteliJ. Never got there, either in Java nor Kotlin, just a simple console app. I admit, it was only one evening of trying, but in other evenings I managed to setup Zig, Rust, node.js, Go without any issues
@inohope
@inohope Год назад
@@ThiagoPagogna What's the point in wasting time on that?
@andym2723
@andym2723 Месяц назад
The power of Java is it’s JVM. You need traditional programming there is regular java. You need a cloud oriented solution for fintech there’s scala. You need rapid prototyping on the web there’s groovy. When I say web I refer to traditional web pages on the internet not intranet applications. You need RPC front end solution for front end web there’s GWT or Vaadin. Kotlin for mobile applications.
@Larry821
@Larry821 2 года назад
After many years of C#, I thought it would be a cakewalk to work in Java. After all, they are virtually identical languages aren't they?? NO!!! I had a very tough time trying to actually work in Java. There were numerous technical quirks and annoyances that were difficult for me to surmount. I gave up!!
@wheresmyclicker
@wheresmyclicker Месяц назад
Does the dotnet vm take less time to spin up than the jvm?
@lx2222x
@lx2222x 6 дней назад
Yes dotnet is faster. Also when compiled with AOT you get instant startup times like in C++
@jaymartinez311
@jaymartinez311 Месяц назад
the fact i can do this similar to js/ts makes me pick c#: var foo = new { // Some object props } Thats just one thing without a LinQs example or any of that and C# 12 is on another level.
@tordjarv3802
@tordjarv3802 2 года назад
Just a correction, Java recently added records.
@McCulloughAssociates
@McCulloughAssociates 2 года назад
Yeah, we produced this prior to J18 release
@tordjarv3802
@tordjarv3802 2 года назад
@@McCulloughAssociates I suspected as much, and that is totally fine. Both languages are still evolving allot so a statement that was true a moment ago is not necessarily true now. Anyway I found your video to be very informative and provides a good overview of either language. Keep up the good work.
@DK-ox7ze
@DK-ox7ze 2 месяца назад
Please do a similar video comparing both languages to Javascript/typescript.
@McCulloughAssociates
@McCulloughAssociates 2 месяца назад
Will do!
@DK-ox7ze
@DK-ox7ze 2 месяца назад
@@McCulloughAssociates Looking forward to it. Will be great if you can do two separate videos comparing JS to each.
@babutschi
@babutschi Месяц назад
The question is so ridiculous. 😂 C# > Java
@user-mw4yp3jm1v
@user-mw4yp3jm1v 2 года назад
Yes,much much better.
@utsavshrivastava9481
@utsavshrivastava9481 2 года назад
Java spring boot enterprise world microservices just asking any language beat java in this department? Forget about boiler plat code lombok dynamic proxy spring boot autoconfig lambda stream making easy now what other option for microservices enterprise and scalability???
@haroldpepete
@haroldpepete 6 месяцев назад
i think java's remained current thank to spring, spring is used in a lot of big companies and it's a great framework, i would say the best in the industry
@efrenb5
@efrenb5 2 года назад
Issues with running .NET anywhere? Been developing in Windows .NET that run in a Linux server. Never had any issue during deployment. That comment confused me.
@jangerman
@jangerman 2 года назад
The best thing Java has going for it is how relatively easy it is to port to C# ;)
@henfozhu1064
@henfozhu1064 2 года назад
讲得有道理
@bronzekoala9141
@bronzekoala9141 Месяц назад
I wonder why chacked exceptions are a bad Idea? Because without being a Java Dev, it sounds really great. It always bothered me in C# that you never know when a method could throw.
@McCulloughAssociates
@McCulloughAssociates Месяц назад
It is good in theory, but in practice it can be a problem. Think about the HttpServlet class in Java. To create a servlet, one must subclass and override doGet, doPost, etc. The superclass methods declare throws ServletException and IOException. These must be replicated in the override. However, most developers will access a database that throws SqlExceptions. Now the developer must try/catch those. A common programming error is to simply ignore the error, leaving the application in a 'good' state even though the operation failed. The correct move is to rethrow a runtime or servlet exception with the original nested. This clutters up the code and doesn't add any value. Code that can really handle the exception probably doesn't care what the problem is. It will simply log the error and redirect the user to a sanitary error page. Having all the layers of code in between have to be exception aware defeats the purpose (essentially becoming a return code that has to be propagated)! Bjarne Stroustrup explains the reasoning for dropping the feature in C++ 11 by saying after decades of use, most applications handle all exceptions the same way near or in main and all the exception declaring just made everything more cumbersome and error prone.
@kinsondigital
@kinsondigital 2 года назад
C# every day and twice on Sunday.
Далее
How Senior Programmers ACTUALLY Write Code
13:37
Просмотров 1,3 млн
What is the Java Job delusion?
12:23
Просмотров 104 тыс.
Java vs C# (C Sharp). Что выбрать?
14:40
Просмотров 239 тыс.
Is C# Better than Java?
18:41
Просмотров 12 тыс.
Solid Programming - No Thanks
32:00
Просмотров 237 тыс.
God-Tier Developer Roadmap
16:42
Просмотров 6 млн
Why Should I Choose C# As My Programming Language?
18:50
keren sih #iphone #apple
0:16
Просмотров 1,6 млн
don't throw your faulty fan
0:24
Просмотров 2,5 млн
ВЫ ЧЕ СДЕЛАЛИ С iOS 18?
22:40
Просмотров 104 тыс.
TOP-18 ФИШЕК iOS 18
17:09
Просмотров 675 тыс.