C# vs. C++ Code Comparison

  Рет қаралды 256

Gavin Lon

Gavin Lon

Күн бұрын

Пікірлер: 14
@krzysztof3546
@krzysztof3546 5 сағат бұрын
Thanks Gavin. Please do a deeper dive video when you have a moment. You have a talent in explaining things.
@GavinLon
@GavinLon 5 сағат бұрын
Thank you! Sure - I'd love to a do a deeper dive into this topic! :)
@womenaria
@womenaria 7 сағат бұрын
Gavin lon ❤❤
@happyfarang
@happyfarang 6 сағат бұрын
You should mention that you can instantiate a new object and assign it values not as references. You can also make a constructor to avoid references. It's just another approach than c++. There are pros and cons to both languages. I like c# because I can let my brain rest more. Lol. It's easier but .. also have It's own pitfalls.
@GavinLon
@GavinLon 6 сағат бұрын
Absolutely. Thanks for your comment. I was trying to keep the example as simple as possible and focus on a small aspect of both languages for the comparison - so I tried to avoid nuances. :) I may do a deeper dive in a later video.
@yogibarista2818
@yogibarista2818 2 сағат бұрын
Yes - C++ classes are value types by default, while C# classes are reference type by default - creating a reference type class in C++ is possible but awkward, creating a value type class in C# is ... yeah, no...
@GavinLon
@GavinLon 2 сағат бұрын
Thank you! :) Yeah - you can use a 'record' in C# - which kind of simulates the behaviour of a value type (but behind the scenes is a class). You can also use a struct in C# which is a value type.
@bk9600
@bk9600 7 сағат бұрын
Great video, but honestly programmers should avoid c++ if they want to keep their sanity
@GavinLon
@GavinLon 6 сағат бұрын
I'll be honest with you. I've been a professional developer for a long time and I would not like to code professionally using C++. You're right - could be a serious mental health risk lol
@ulrich-tonmoy
@ulrich-tonmoy 6 сағат бұрын
and still tools like blender Godot are programmed in C++ Maybe for web development the lowest you should go is Go but for system C/C++ is still most used
@GavinLon
@GavinLon 6 сағат бұрын
@ulrich-tonmoy Sure, absolutely - I joke about C++ but it is of course a fantastic technology and for system development or wherever you are resource constrained by your target device or in general you need highly performant runtime code - C++ or C is the best choice! :)
@bk9600
@bk9600 6 сағат бұрын
@@ulrich-tonmoy I just joking you know right 😂😂. I do use c++ for game development in unreal and systems but I prefer to use Java for systems. C++ is good but seriously coding in c++ can make someone go mad
@GavinLon
@GavinLon 6 сағат бұрын
@ulrich-tonmoy - Well languages like C# and Java have the benefit of their designers learning from the C++ language (standing on the shoulders of giants). Yeah C++ and Unreal is probably the best solution for game development. :) I think if I was a professional game development I would also use the Unreal game engine.
Is C# Better than Java?
18:41
Gavin Lon
Рет қаралды 15 М.
Stop Using FirstOrDefault in .NET! | Code Cop #021
12:54
Nick Chapsas
Рет қаралды 50 М.
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 12 МЛН
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 42 МЛН
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 258 М.
Is Blazor Better than React?
14:25
Gavin Lon
Рет қаралды 49 М.
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 23 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 307 М.
Is C# Better than C++?
12:43
Gavin Lon
Рет қаралды 1,8 М.
Weak Pointers in C++ (std::weak_ptr)
17:25
The Cherno
Рет қаралды 49 М.
Advanced C# - LINQ Tutorial
3:07:24
freeCodeCamp.org
Рет қаралды 122 М.
Linux from Scratch
2:35:42
Titus Tech Talk
Рет қаралды 174 М.
Top 10 Reasons to Learn C# 2020 - 2024
2:28:13
Gavin Lon
Рет қаралды 2,8 М.
Intro to Records in C# 9 - How To Use Records And When To Use Them
1:19:44