C vs C++ vs C#
Вставка
- Опубліковано 20 сер 2024
- Join this channel to get access to perks:
/ @conaticus
Discord Server: / discord
Github: github.com/con...
Twitter: / conaticus
Learn C++: learncpp.com
Music Credit:
Faster Does It by Kevin MacLeod is licensed under a Creative Commons Attribution licence (creativecommon...)
Source: incompetech.com....
Artist: incompetech.com/
Thanks for checking out my video, made a small mistake in saying that C was a functional language. It is actually a procedural language. Sorry for the mix up!
Hey, it's functional, if you use the definition of "it functions"
@@erikgrundy Haha yeah, what separates it from C++
@@conaticus C++ will always _object_ to what you're doing.
@Mikołaj Kraszewski Kind of - it depends on what you're talking about. It's sometimes said that the difference is procedures don't return anything, whereas functions do. In that sense, they're very much the same. However, a functional language is very different from a procedural language. Functional languages put heavy influence on passing around and returning functions, and describe a program as a composition of a bunch of functions. Procedural languages view a program as a series of actions (procedures) that are taken one after the other.
Tldr: functions and procedures are very similar. Functional and procedural languages are very different
@@erikgrundy thanks for the clarification I like how procedural languages go about doing stuff
I know people often say that C# is basically the same as Java, but as someone who has done both, Java really has a special quality to it that makes me want to tear my eyeballs out that I can't quite place my finger on. C# on the other hand makes me happy like 90% of the time.
They are most certainly related to each other. I call Java the ugly twin of C# that has some issues but through sheer tenacity and some luck still is more popular.
But in the last few iterations C# realy began to diverge in a lot of ways, more and more functional programming concepts are added, more and more syntactic sugar and if you show somebody a C# 6.0 and a C#10.0 program, both utilizing the language features to the fullest, you would not believe it is the same language. The only thing, IMHO, that Java has over C# is its enums, the rest is equally or better solved in C#.
Java is a piece of shit programming language and was made for those who couldn't programm in C++. Everything in the language feels like a compromise.
What is bad about java ?
@@akj7 Dude, chill, it's just a programming language. While I do agree that Java feels like it is afraid to fully commit to a concept (I mean, it is OO, but its primitives aren't, because ... reasons ...), but every language has its own niche. Javas big plus is its platform independence and ridiculously many and huge supporting libraries. It kinda somewhat turned into the COBOL of the 2000s.
I for my part avoid Java-Script as much as possible, I just don't like it. But I wouldn't call it trash, it just isn't for me. C++ isn't the be-all end-all of languages either, even that language keeps on developing, just look at the differences between C++98 and C++20. Calling other people "too stupid to code in C++" misses the point and only shows that you somehow feel that this language is superior in some way. And the first C++ I coded in was Borland C++ 3.1, so I've been around the block for quite some time now.
@@randomaccount6146 This is only my personal opinion, but Java is just ... inconsequential in so many ways. It's OOP, but abandons it when it comes to primitive types. It's best practice to implement getters and setters, yet the language refuses to add the functionality, even as syntactic sugar. There are libraries that allow you to annotate fields and provide these automatically, but then again you kind of lose the reason they are there in the first place as you now have limited control on how they behave. It has generics, but they are statically replaced at compile-time, which brings along its own can of worms if you dig deeper into it. Jakarta is a hodgepodge of different frameworks that wear a coat and pretend to be a unified thing. The fact that its best practice that you have to convert a literal string that contains a decimal value into a decimal variable, because "the compiler sometimes doesn't play nice" and rounds it in weird ways. It has a metric shit ton of libraries and frameworks that can be used, a lot of them overlapping or intended as replacement of other frameworks - yes, it gives you a lot of possibilites to choose one, but at the same time you have to choose one, without knowing how long it will be supported. It's not one big thing that makes the language bad, by no means. It just adds up and adds up, a lot of small and IMHO unnecessary inconveniences.
C++ is beautiful... in a very chaotic way... kind of like how the light of a nuclear weapon is probably beautiful before it kills you...
Looks like you are into BDSM, or something like this.
@@bambalus8418 Probably a common trait in c++ devs
Man this is the best comment here.😂
@@fededevi1985 WHAT DID HE SAY
Did ya know that you can still see the shadow of people printed on the ground near the atomic explosion this is terrifying.. you can really see human shadow on the ground/wall etc..
(Not made with print())
I had C++ as my first language because my teacher decided so. And then, I decided to learn C# for myself and every time I learned something new I was thinking: "No, it cannot be THAT easy". But it could, and it was THAT easy despite the feeling that I coded too little for anything to even exist.
Do pointers and direct memory manipulation allow you to write more efficient code? Yes of course
Are they good for a beginner to learn? I dont think so because its so easy to write unsafe code and memory leaks. I mean theres a reason in order to do anything with pointers in C# first you need to surround the code in a 'unsafe' block and the compiler setting needs to allow the use of 'unsafe' blocks
Try python ;-)
"My child will use functions to index into an underlying list."
"int this[int index] => this.list[index];"
@@cerulity32k Holy shit I didn't think I would've laughed louder tonight than I laughed after reading this.
my experience going from c++ to python
my reaction to see my exercise of a 50 lines linked list with hash table be completely replicated with 2 lines of code in python was "FUCKING WHAT"
As someone who learned c++ when I just started I can confirm c++ provides nothing but depression except the time when code magically works
That dreadful feeling when somebody was struggling with the same issue and sees your program run and asks excitedly "how did you do it?!" And you cant decide wheter to lie and say you're just a code magician or be honest and admit it was a lucky compile.
And when you finally get it to work, you find out that it is one huge memory leak.
My main rule whenever I’m doing something in C++ is “If it works, it works, it doesn’t not work, I don’t know how, I don’t know why, I don’t care how, and I don’t care why.”
"C++ , the language has a steep learning curve, and despite what many will say I would not recommend this language for beginners, especially if you're already suicidal" this is ridiculously true. lmao
What programming language a beginner like myself should learn first ?
I want to become a data analytics.
What should i learn ?
@@ironlake8944 3 days ago and 7 mins ago, lol
@@FoxSlyme ?
@@ironlake8944 probably SQL
@@пидарасина_228
Hey bro I'm a bit confused.
There are many names but i don't know what are them. For example, github, frameworks and many more.
Is there any video or website that explains what is what because I'm a total newbie
I like how C++ is depicted as a depression source through the whole video
He's not wrong...
I can’t wait for AP cs next year which is in Java bc c++ is gonna make me kill myself
it is
It kinda is.
and through your entire college years
I started out with C++ algorithm programming and I'm glad I did because the way you write in C++ makes you understand a lot of the core concepts of languages. I'm using Lua now.
Well I started with Python, and I remember I tried learning languages like C++ before Python. But I just couldn't wrap my head around it (pretty much I couldn't understand or memorize anything). Now that I've been using Python for a few years. I decided a while ago to learn some other languages like C++. And now it's actually easy, maybe because of how I learned a lot of concepts of programming from Python. I just wanted to move onto other languages, because I can't stay in one language forever. I gotta at least know some other languages.
@@pyp2205 I had an amazing teacher so that's one of the reasons why I was able to understand one of the more complicated languages. However it was extremely hard to learn new stuff myself. I made an ASCII game, tried to wrap my head around how graphics work and then couldn't do it anymore without proper teaching. I'll however go back to UE5 which uses C++ after I get a PC that can run it smoothly
You are alive thats amazing
@@pyp2205 thats exactly my story
Lua my beloved
Trying to learn C++ as a first language, has been great. But haven't gotten deep yet. I'm only 7 hours in a 66 hours C++ course. Wish me luck guys.
Brace your butthole good sir. I salute you o7
Do you still function?
@@BombLobster i think this guy commit suicide
Same here. I'm only 24 years in.
Are you still alive
Fun fact: C# is C with 4 +
you just blew my mind now i cant unsee it .
you can also see it as 2 +'s. if they are long enough
@@fengchen303 wth is that translation
rip musical notation
Absolutely, but it's really C++ ++.
Just so everyone knows:
C# application can be used accross multiple systems without having to be build specific, thanks to its interpreter. You can also program mobile apps and web applications. C# also allows you to quickly and easily wrap C/C++ in your code
C# is my farourite.
You mean MS Java?
Does it use something like Java bytecode?
Sorry i might be a newbie , i still cannot understand, can C# be used to program video games for pc?
@@taoliu3949 there may be a misunderstanding. I'm not talking about the .NET framework which is windows only but actually .NET 5. I think there are very few areas where .NET 5 and above won't be a good fit, however it is still really new, that's just my opinion.
Your use of the fast invert square root code at 1:02 has not gone unnoticed.
Trying to teach myself a few languages a few years prior I remember C++ was the one I tried first because of the good things I've heard about the language. It gave me a hard time so I switched to java really soon and now I use both java and c#
Thanks for making this video and making me feel like I'm not stupid for having trouble with c++
C# "is" not just a copy of Java. It "was" on creation. It is pretty radically different now. And in very positive ways, IMO. It seriously diverged around C# 4.0.
It's actually based on C++, you could say it's C++++. A matter of fact if you slice the # symbol in two you get four pluses. It was going to be named COOL which means C like Object Oriented Language. So that whole copy of Java statement is just a myth.
@@TuLox876 If you google it, it was basically a copy of Java. The syntax was extremely similar. It angered the Java team because of how similar it was. But calling it a copy is hyperbolic, sure. But C# is FAR closer to Java in syntax than C++.
@@XoADREADNOUGHT and yet syntax is a very superficial part of a language. It is FAR closer to C++ when you actually compare features and how they are implemented. I know all three languages very well, so I feel confident comparing and contrasting them. C# is in a league of it's own, several levels above both C++ and Java but if we must look at the features and compare them, it is closer to C++. For example, here are the features both C# and C++ have in common: unsigned types, default parameters, variable number of parameters, operator overloading, base keyword, structs, enums (Java enums are very different), namespaces, ability to have multiple classes in file regardless of visibility, can split class into two files (yes you can create the equivalent of headers from C++), lambda functions (again Java does it differently), and a whole lot more. A language is far more than just it's syntax.
@@XoADREADNOUGHT
He is right, when comparing the way "VM" works in both systems they are quite different, in Java the JVM acts more like an entire operational system abstracting memory control and thread management and handling all the resources for the program, while in C# the CLR is just a layer of abstraction over some of the resources of the program that are used intentionally by the programmer like managed objects memory control (with GC) and some other tiny things, and of course the Jit. In the end, the CLR acts more like a utilitary tool that power the C# while C# itself is compiled in IL and then in machine code by the Jit, so it is far more closer to C++ than to Java in this sense. Of course the syntax is much more closer to Java in managed part, at the same time, the unmanaged one is very closer to C/C++ with things like pointers and optional manual memory management.
@@diadetediotedio6918 That's great. I was only comparing the syntax. People are arguing against points I never made. ** shrugs **
I would say it's worth learning all of them, starting by C.
If you learn C, learning the rest becomes considerably easier, and each language comes with its own uses.
C# is very flexible for all platforms (PC, mobile, console), making applications really easy and accessible to port to these.
C++ is great for game developing, especially for triple A entries.
I myself like C# the most, because despite many considering C++ the better one to develop games with, C# also is good for game-making but for other things as well.
c# is for unity, unreal engine uses c++ but you have blueprints anyways
c# is easier to write and i know a lot of good games written in unity
unreal engine is more for games with good graphics
so it depends on your use case
but unity also has visual scripting and its compatible with c# scripts
@@hjrgf yeah, since that comment I have been working on a game on Unity ans C#, I can confirm C# is great for game making.
@@RealValkor it's sort of funny how some people write off unity just cuz it uses C#. What, you hate languages that aren't a pain in the ass to learn?!?
@@mohammedu7105 yeah lmao, plus programming follows the same logic, even if the language is easy... It's good to learn it as it can set a base for learning harder languages. The basics of C# helped me understand programming and in turn made learning C much easier.
Im currently learning c++ for hobby (i wanted to make my own mobile game)🥲.reading all of these comments confused the heck outta me......again.😭c# or c++?
Pretty much everything summed up:
Use C if you want to have mental issues
Use C++ if you want to end your will to exist
Use C# if you want to not touch a computer again
And use Java if you hate the user
What's wrong with C#
@UltimateGamer-sl2kx Idk, the only problem I had with C# was that i kept forgetting the semicolon (which is because I was coming from Python, and all of the languages mentioned also use the semicolon, so C# isnt alone). Other than that, the language is simple
@@GrowMode_YT Thanks haha
I thought people hate Java the most. But your hat for C++ is at another level
RIP C++
It's a love hate relationship
i actually like c++, I'm not an expert in it at all, I write simple code and for that it's awesome
Yeah I don't blame him. You need 10000 years to properly learn C++.
when he says "CIA Torture Programme"
c++ is a feature, high lvl languages always have their bootleneck's - as many as u have more experience in using them
My school chose to teach C# and so far it’s been quite fun to code with,
But I also have to learn assembly and trust me, if you don’t hate yourself, do not learn assembly.
This. I hate myself, and I learned x86-64 assembly just for fun.
learn C. you'll understand as much about the hardware, and core programming concepts, without the headfuck. and when you switch to a higher language you'll actually have respect for all the people who developed all the libraries you're using
@@feandil666 my school chose to teach C# and assembly, (and I have a really bad teacher) so I basically have to learn them by myself, So I won’t be learning another language for a long time
@@ryanwogget same with me
When I was in uni, I learned C, C++, and assembly.
I'm in embedded engineering, and I mainly use C and python.
Assembly was fun. More fun than C and especially C++, that's for sure.
This is my first time in this channel and I love this narration 😂, I've liked and subscribe
This reminds me of the many jokes I have heard in my comp science class. e.g.
- There are only 2 kinds of people, those who don't understand pointers and those who are dead
- The Geneva Conventions have a critical loophole - you can torture PoW by teaching them pointers
- 3 C programmers went to a bar. One pointed at the wrong beer. One pointed at someone else's beer. One pointed wildly at all the beers. The bartender couldn't understand them because she could only serve basic instructions.
🤣
As a CS student, I learned pointers pretty early on in my programming journey and they aren't that crazy to deal with once you just practice with them a bit. As far as C++ goes, pointers are some of the least difficult parts to learn and it goes way deeper.
I haven't dealt with C++ in over an year and yet C++ templates still bring me nightmares an a regular basis
Pointers are still a source of bad bugs and security flaws regardless how experienced you are. Unless they are safe as in go.
Its also important to know how memory works, and where you store variables in your code. Pointers can easily be misinterpreted
One of my research topics in university was to present about and implement a "Weight Ballenced Binary Search Tree" data structure in C.
After my experience with that, basic pointers were never an issue, after having dealt with pointers to pointers to pointers to pointers to tree nodes. And no, I'm not even kidding, four layer deep pointer pointers.
So happy to just have Collection objects in Java that can take care of all that heavy lifting for you.
@@Starhawke_Gaming it is not complicated to use pointers at all once you know how. But that does not eliminate the endless source of bugs, security flaws and memory leaks that is caused by handling raw pointers. In commercial development, there is only limited time...
I'm 53 and started programming at 14 though I don't do it any more except for hobby projects. I've done Basic, Fortran, Pascal and C mostly and I *really* don't see why people have problems with pointers. Maybe because I got it at a young age, so to speak, to me is quite natural and simple to use, even pointers of pointers. I understand it can get very messy quickly and it is quite dangerous because you are basically messing directly with memory but it also gives you the power to do some amazing tricks with incredible speed.
Exactly. Pointers are a potentially powerful tool. It's the programmer that is dangerous, not the language. It sounds like your about 2 years ahead of me (be 52 in a few months, also got my C64 at 14 after growing very frustrated with the limits of a timex sinclare 1000)
Anything is dangerous when in the hands of those unwilling to understand what they have. Look at the calamity that Mickey Mouse caused when his sorcerer went off to bed and Mickey animated the broom...
I admit that I'm 'jaded', but "lowering the bar" (eliminating pointers) so that any baker or butcher can "learn to code" is the tail wagging the dog...
Don't know if I'd want to live in a world without dynamic linked lists...
@@kaseyboles30 As a relatively new programmer, my first language was c++. I never really had much of a hate for pointers as I think I understood how to use them decently(Atleast i'd hope I was) but from my friends words they hated them. It probably doesn't help that the teacher also made it seem like it was going to be a very annoying lesson to get into when I first learned.
@@kouko6727 The problem with C++ is it is a mid level language tryin to be a high level language by tacking on OOPS. OOPS in of itself isn't even what they guy who invented the term meant and has issues in it's current incarnation. For one it tries to lump code and data into a single 'thing' which is stupid in many cases and bad in others. It's a niche use case, but it's become a cult and say anything bad about oops and you get treated poorly. I don't care for myself, I learned before home computer were 32 bit, and only a few even touched 16bit. I learned basic (which is just that for the most part) and 6502/6510 assembly/ml and later ISO C and some ansi-c (which requires you tell the compiler everything 3 times it seems compared to iso c). and some pascal and logo and other things. I remember when html was just a simple markup language and programmers used to laugh at people who said they 'coded' html.
Learn a bit about how computers actually work on insides, what a register is and does, what a context switch is and how branches and calls work at the machine level and which is more cpu cycles that the other and when. What endian is. And a little bit about programing paradigms (functional, procedural, imperative, etc.).
Starting at C++ is like starting in a junk yard and trying to understand automotive engineering. Mind you a lot of code monkeys who just convert specs into code don't learn much more than C++ and java and a few other languages and basic patterns to match to common problems, it's not the most creative and effective career.
I think the fear of pointers could possibly come from the fact that high level languages hide their existence from you. I have somewhere around 6 years of experience in programming, all high-level languages and only now since I started learning C++ I actually need to learn what pointers are and how they work. I tried to look for a tutorial on pointers and it was almost 4 hours long and would, for me, be a deal-breaker if I didn't HAVE to learn C++ anyway.
2:13 "use C++ if you want to write low level applications with more control at the sacrifice of your will to live" kkkkkkkkkkkkkkk, bro i cant that was too good.
As someone who has been programming in C++ for over 20y and uses it almost exclusively... This video is extremely accurate.
I've been using *just* C++, so things you call ,,torture" is normal for me.
I mean, I remember when I helped my sister with something in Python, but I've never gone anywhere outside C++ past that point.
The best video to watch after suffering one and a half weeks of C++ learning. I agree with the fact that it makes you lose the will to live
01:13 don't start with this language if you are a beginner, epecially if you are already suicidal
Every University: ignores this advice and starts with C and C++ in the beginner courses
Universities: ua-cam.com/video/_xZ_TD3QDw4/v-deo.html
C is the basis for the majority of popular languages today, so learning it first makes sense. Makes learning C++, Java, C#, Python, JavaScript much easier.
starting with (and only having) c++ made me drop the major lol
“Used for the CIA torture program” “at the sacrifice of your will to live”
Help I’m dying of laughter 🤣🤣🤣
I love the way you tell the information to the audience all while being funny
1:02 You know you're about that life when you instantly recognize the fast inverse square root function from the Quake 3 source code lol.
entertaining and educative, hopefully this channel will be popular soon
Having learned C++ and C# in parallel to each other, I can say that I prefer C# despite the benefits of C++. My previous group wrote a C++ based service to communicate with IoT devices along with a C# based installer. The senior developer said C++ was preferred for the service because of the level of control he had with TCP packets and memory pointers.
Then that "senior" developer was not so senior as in C# you can simply enable unsafe code and have exactly the same benefits: pure native system calls, pointers, self-managed memory, etc...
Also, use C/C++ if you want high performance, properly structured code, not having to deal with 10 million classes, not having to create a class any time you want to do anything, learning operating systems, learning embedded systems, learning network systems, learning security systems, and even scripting if you're good enough - vim and fast fingers go a long, long way.
Don't learn C/C++ if you want to glue some code fragments together and hope it works. It'll suck your soul and joy like a Dementor. It'll make you want to rip pieces of your own flesh out just to balance out the psychological pain. It'll get inside your head and make your eyes bleed while spending hours parsing through those thousands of lines of code to find that shitty off by one that's generating your runtime error. It'll make you scream in agony when someone cracks your software open because you forgot to free a pointer or used a deprecated unsafe version of a string library. It'll fuck you up, heal you, and fuck you up again.
IMO these languages are the best languages. They provide both abstraction - you can implement OOP concepts in C if you're good enough to do it - and control - memory management, kernel calls, process execution, etc. You get fast speeds, you get proper syntax - so long having a line of code that fills up your whole screen - and you're pretty much forced to use best practices, principles and patterns - the other option is ripping your eyes out while figuring out why the hell 1 out of 3 runs generate a seemingly nonexistent segfault. These are not your standard find-a-lib-read-a-tutorial-glue-some-shit-together-there-you-go java-type languages. These are craft languages. They reward those that take the time to learn how stuff hows. To figure out how the compiler processes things. To understand how the linker manages resources. To deeply think about what's the best way to cut a corner and get that min-max optimization that will make your system 1ms faster on that particular function. On the other hand, they punish everyone who doesn't do that. Harshly. Terribly. They'll scream "WRONG!" in your face, and when you ask why the answer will be "STOOPID!". Very punitive. Very rewarding. Very fun.
And truth is, the world runs in C. Your OS runs in C. Your phone runs in C. Your browser, your server, your database, your router, your car, your toothbrush, your microwave. Everything. Even if it's not in C, you can code it in C. That's the beauty of it. That's why it's so hard. It's an art form in it's own right. Plus it'll make virtually any other language feel like pushing solids into shapes. It's wonderful - and highly addictive.
Then there's the culture. I've found that C coders are very ruthless, but very empathetic once they assert you're in it for the long run. The same person that gives a half backed sour answer will take their time to slowly guide you through the process if they feel you really want to learn, really want to master it. It's really a whole thing. Spiritual, even. Can't enter the Temple unless your heart is in the right place.
So yes. Access your goals, take your time, figure out how far down the rabbit hole you want to go, and if the answer is 1, you'll know.
C# best.
Well said. The power and control of C is truly worth whatever learning curve it might pose imo. It forces you to understand deeply the space your working with and allows you the flexibility to craft your own systems that work exactly the way you want which also makes it way easier to understand and change imo.
Also pointers and memory management are not nearly as scary as everyone makes them out to be. I came from c# and used to think that fighting the garbage collector was worth it because manual memory management would be a nightmare. It's actually kinda easy but you have to actually think about how you plan to store and access memory, which data is persistent and which will be destroyed or moved around, etc. But once you figure that out it's really not that complicated.
Ngl I wanna learn c++ but I’m discouraged, lowkey just doesn’t seem fun. Programming needs to have that aspect that makes it enjoyable. I don’t mean that challenges aren’t necessarily enjoyable, it’s definitely fun to be challenged when coding. C++ just looks so goofy and unpleasant. I just learnt Java too btw and realized after months of learning and trials that I can’t do nothing with it, I originally wanted to mod Minecraft but now I’m just like..
@@randomperson5454 #include
@@randomperson5454 I'm halfway through my first C++ class and I'm really enjoying it. The problem solving tickles my brain in a way almost nothing else does. I have lots of experience with Linux and some with shell scripting so a lot of operators look and feel how I expect, it's like I'm right at home. I do recommend it.
C is NOT functional, it's procedural. Functional means that functions have no side effects, which is definitely not the case for C. Functional also implies other things, like First-Class-Functions, meaning you can pass them around just like any other data type, ie:
def f(af):
return af(5) + 3
def g(x):
return x * x
print(f(g)) # --> 28
EDIT: Also, in functional programming, a function can be created anonymously. If you define an int, for example, you would use a syntax like this:
myint: int = 69420
In a functional language, functions can also be created like this:
myfunc = lambda x: x//2 if x % 2 == 0 else x*3+1
This comes in useful when, for example, a function A takes another function B as a parameter, but you don't want to bind B to any function name.
Your comment should be pinned
But you can pass function pointers
@@dimi5862 that's not what being functional means
@Pavel Alexandru linguistic banter
I can go deeper and claim that every language is in fact unstructured and imperative, because in the end everything is binary code
functional languages are those with minimised state and first-class functions, simple as that
Bruh. C CAN pass functions as arguments.
After watching this video, I'm glad I chose to learn c#. Thanks for the upload! It's funny I've already programmed 2 full games but if anyone ask me to explain how I coded them, i have no Idea what to say..
with your keyboard, obviously
Started learning my first programing language C#. Enjoying it so far
"I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone"
- Bjarne Stroustrup, author of C++
no way you only have 61 subs this video was educational, funny, professional, and simple to follow
he had 61 subs 3 days ago??
@Meowmere ikr?
@@hermanzhukov8044 oh hey he's increased the size of his channel by over 25% in 12 hours
wtf 61?
Honestly man, this is exactly what I need. Quick learning snack to help me get my bearing. Keep up the awesome work man!!
I'm glad I started by learning c++,I left halfway because it was too much.i went to python and i learned in a just a week what took me two years to learn in c++.
Moral of the story is,sometimes it helps to go for the boss first get your ass beat and then go for the weak,it will be much easier
C++ is like Lego. You can build the castle of your dreams or scream in pain because of the peices scattered on the floor
nice video mate! I subscribed this channel, a lot of beginner will ask, why there is no "string", but "pointers everywhere" in c++ XD
Thank you! And yeah, C can be weird
C++ has strings. It's in the standard library
std::string
@@aaronspeedy7780 and the non-owning string_view.
I recognize that algorithm! (1:02) It is the fast inverse square root used in Quake III. Nemean made an excellent video on it.
C++ be like: if you're feeling suicidal, you've come to the right place
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off"
_"C is a functional language..."_
No, correction, _procedural_ describes it's paradigm, because functional describes another, much wonkier, paradigm, aimed at mathematicians...
Edit: Yeah, so that last part was really divisive... 😂 I should clarify: I'm absolutely onboard with imperative styles of programming, but it's a fact that purely functional programming is derived from Lambda Calculus, often in a fashion to accurately represent mathematically proofs programmatically, a fact which has resulted in wonky decisions in designs of purely functional languages in particular... if you want to question that, take a look at APL, and tell me that syntax makes for a good programming experience...
I was going to leave the same comment, Hope he reads yours
Wonky is in the eye of the beholder
I don't think "aimed" is correct term there. While it is correct that functional paradigm has lots of mathematical concepts, they are just different tools that accomplish similar results. Languages that aim to non computer science people like mathematicians, engineers, scientists etc. are usually python or python like; easy to learn, batteries included.
It's not aimed at mathematicians. It is aimed to solve some problems in a much simpler way. You just have to know when to use, but in CS it has a hella lot of use.
@@TheDragShot no, wonky is definitely in the eyes of the beholder. As someone who learned OOP first, functional programming is the most beautiful shit i've ever laid my eyes upon and it's so much easier to reason about than OOP.
wow you deserve more attention great video short and full of the important infos also funny great job keep it up mate!
Thank you!
0:05 two are coding languages, one is a musical note
C is note too
During one of my networking classes in college, we had a group project where one person made a PHP repository connected to a SQL database and the rest of us had to make our own unique client using a different language to pull specific data from the database through the repository. The kid who had to make the C++ client was easily the most miserable, and the kid who made the Java client I don't think even finished the project lmao
Kid who choose python 😁
this is unfair lol
@@morijin5568 someone was making the client in assembly
"pretend to know what you're talking about"
isn't that every person on UA-cam who does tutorials and isn't a nerd
i mean you sounded like you knew the C family, i feel like you actually do
That is everybody doing tutorials on youtube period*. I am yet to find one good youtuber that is beginner oriented teaching C++ that actually knows what he's talking about.
Liked the presentation. Some older add-ons (many of which are pretty nifty I've found, like the various versions of Allegro, [enhanced] Glut, and on and on --- the older versions) work better under C or C++ --- just because some stuff is a bit long in the tooth doesn't mean you toss it away. I like the KISS ways of doing things: 'Keep It Simple, Stupid.' Simple, I've found, is generally the smarter way to go.
I GOT STUNG BY A BEE WHILE WATCHING THIS MAN WTF HOW DID IT EVEN GET IN MY BEDROOM 😭😭😭😭
Your C++ description is spot on! I studied C back in Uni and I never came close to liking C++! I tolerated C and Pascal but C++ was just a nightmare!
move your lazy arse
Don't stop bro. Keep making such videos, and I bet you'll be better than fireship.
No one could beat fireship!
@@conaticus No, actually conaticus can.
For a old timer - I suppose it’s what you grow up with. I leaned C back in the mid 80s and loved the language, maybe I’m a bit strange, but I loved pointers too, never had a problem with them. In my time I’ve probably used every major language including C++ and C# right back to the days when it was still a Microsoft experiment named project Cool. I found this video quite numerous, my software dev days are now over, but the 30 or so years I spent doing it were some of the best times I’ve had.
“Write C++ if you want to write low level applications with MORE control at the sacrifice of your will to live”
That one got me good
I had to learn OOP in college by making a game in C++ without an engine. It was a huge challenge.
I did C++ a really long time ago and he is really not lying about it.... Sometimes I get nightmares and wake up in the middle of the night in a sweat, tears streaming from my eyes and my hands tightly gripping my throat as I try to catch my breath.
Dude I loved this video was def expecting you to have more subscribers. Very well done:D
Thank you!
1:09
My university: well too bad jack. I expect GTA 7 as your end of term project without using any engine or framework
We have porygon at home
Porygon at home:
Selfish of me to want you to remain lowkey and legendary. Hope to see more videos from you !
The situation with between C# and Java has changed drastically over time.
Back in pre-2010, before the Oracle buyout Java was well-supported by Sun. Java was incredible for supporting multiple OS’s (“Write Once Run Anywhere”), whereas C# was very similar but without any portability.
Now the situation is the opposite. Mono made C# extremely good for cross-platform development. C# added a lot of new features, improved performance, etc. Meanwhile Oracle has repeatedly sh*t the bed with Java.
In case y’all don’t know: Oracle is known for buying up a lot of great services from struggling companies (hey, you remember OpenOffice?) and then becoming a greedy patent troll demanding a toll from everyone who relied on that service. See: Dalvik (Google/Android lawsuit), MySQL, etc
Oracle is the greedy soop of the programming world
only oracle product i use is virtualbox even though i should be using qemu
Exactly this.
Oracle Database is also another whole different piece of garbage lol
"Use C++ if you are looking to write low level applications with more control at sacrifice of your will to live."
That's exactly what we need, perfect!
I learned C in my college days and C++ in my CS degree, It was really fun to play with the pointers, you just have to practice in order to understand them. Now, I'm an associate software engineer starting my career in application development. Learning another language like JavaScript feels like a piece of cake...
Subscribed mate. I got a feeling that this channel will be helpful for me, as we will start doing C++ second year of electronic and electrical engineering 😅
learn C, and you'll actually know what programming is about. the rest is just sugar on top.
there's a reason why C++ is used in everywhere that is time critical: it's C with extra features. if you use C# or any other high level languages, you're gonna feel good, but then you'll always wonder why your game is running at 5fps
c# is not really that bad at performance, but I agree that it's not worth it since all the time save because of the easy syntax is nullified by the time spent getting it to run at a decent FPS.
I totally agree with this
Literally no one here knows how and where C++ and C# differ in performance. No, you will not have a game running at 5fps because of choosing C# over C++ unless it's really heavily CPU-bound (like 1000hz physics simulation on the CPU instead of GPU).
Have you tried writing identical games in both? You'll almost always have the same amount of FPS if they were done the same way, with any difference coming from the engine you've chosen.
And if there is an area that strictly needs performance, you can just write it in C++ and use it in C# thanks to bindings.
@@HoutarouOrekiOsu @Hōtarō Oreki Modern AAA titles are neither GPU bound, nor CPU bound. They are memory bound (both RAM-CPU and CPU-GPU). A single look at GPU and CPU speeds vs memory access speed over the years will tell you why. And that's where languages like c++ and c come into play, allowing you to fine tune how memory is allocated and accessed. ofcourse you can custom allocations in c# too, but that is not that tunable.
And regarding your last point, sadly, all core systems like physics, rendering, AI, audio etc are critical to performance. the only area that is not that critical is scripting and that's where it makes sense to use a scripting language or even a managed one like c#. though even then, you have to be aware of your architecture. OOP-like systems (like that in pre ecs unity) don't work well with crossing binding borders.
Ofcourse this applied to games with a reasonably high fidelity and if you are writing a simple indie game, by all means, go with c#. but there is a reason why all serious AA and AAA games are written in c++.
@@askeladden450 well said
Just watched a video about Quake 3. The code at 1:01 is how they quickly calculated inverse square roots for angle calculation
You put the worst time stamp possible
You forgot to mention Holy C.
(rest in peace Terry A. Davis)
having taught myself C# about 8 years ago, then learning a bit of C and C++ at uni (and now teaching myself the rest of C++ working with Qt), yep, you are right. Maybe i'd say C++ isn't quite as bad as you say it is (ok, other than pointers and references), but I guess i came from knowing a language that is OOP and has a lot of similarities with C++. As one of my lecturers put it, C# was what happened when Microsoft asked its visual C++ devs what they didn't understand about C++ and then wrote a language to cater for them. And as another comment put it, C# is MUCH BETTER java, java just seems to make things unnecessarily difficult. Updating to a newer version breaks 90% of your dependencies, primitives arent objects, its got no support for unsigned types (because the developer decided no one should be using them... I don't care what the dev thinks, I expect unsigned types in a static typed language), and of course not forgetting factories to create objects that want to make you throw your PC out the window because of the amount of extra code it takes to do stuff. oh, and the entirely ridiculous state of UI libraries.
C# has been conceived as a middle ground for Java and C++, you can write non techie stuff but if you need to optimize you can make techie stuff appear and use it
I've been learning Java and you won't make me give up after all I went through till now :D
@@marcos_silvestri imagine having a standard logging library that does something else than logging
@@quelqunderandom6143 I haven't reached that log part in my studies. Is that Log4J?
@@marcos_silvestri yep
These are the Comparisons among of Programing Languages :
C vs C++
C# vs Java
Python vs Ruby
Javascript vs PHP
HTML/CSS vs XML
I think you meant ruby
As someone whose first language was C++, learning Java felt very weird, as if something was amiss. Then I learnt Python and felt like I am committing sacrilege.
Unpopular Opinion: Have a good grasp of C eases learning C++ immensely.
In short
C : depression
C++ : clinical depression
C# : depression but java
Pointers aren't hard to understand, you don have to spend some an hour or two to understand them and then practice them before you are ok with them. If you are interested in the topic and you love mental challenges of this type than you will enjoy the time spent on learning pointers. It is that people learn programming while actually hating math, mathematical-logical thinking and hate doing mental challenges of that type. But they still want to do computer science stuff, or at least they say they do.
Hard to understand they're not, they're just hard to find any use for them in the beginning. They seem to not provide any actual functionality in the beginning
@@o.aggelos Yeah, because in school almost everything is thought in completly the wrong way, relying on memorization rather that understanding and guided self-discovery. Pointers aren't even somthing new, they are just an extension of array indicies, but you treat the whole memory as a single array. I guess people from garbage collected languages find it cool to hate on them because they don't understand them? Or is that just the beginner, they know that each time they instantiate a class, they are using a pointer, right?
@@rauldragu9447 I didn't learn C in school. I'm literally 14
C is for pain,C++ is for suffering and C# is to feel good in the moment and then suffer.
I started off with c++ and honestly I’m very glad I did. Since the language is multi paradigm it made learning other languages a lot easier (or atleast in my experience)
Great video, your channel should be bigger!
Absolutely awesome video, I like your humor. And sooo concise.
I'm glad that yt algo brought this video to me. I was gonna switch from C# to C++.
I'm so glad everyone is on the same page of "fuck pointers".
C++ be like: Oh, I shall make use of a breakpoint to suspend the execution of my program, so that I may have an idea of the internal workings that are causing problems.
ASM be like: Bungo have to write subroutine to print letters to screen because Bungo no know why program no do what Bungo want. Bungo no want to use Code View again.
Funny and informative. You got a new subscriber mate!
Instructions unclear, used 680x0 assembly.
Everybody's a gangster untill you aay you program in Cb
As a c++ programmer, when starting it might be challenging to learn c++ if you have no programming background. But if you really want to learn c++ I would recommend you to learn python first and master the basics or at least be proficient at it like using loops, functions, class, and other fundamental stuffs then learn c++ after that. I promise you, the transition will be smooth since most programming languages if not all are fundamentally the same the only differences are syntax and their capabilities.
Am learning python first. Then gonna eyeball C/C++. I hear it's better to learn C before ++. Any weight to that? Or?
@@ugib8377there’s a lot more you have to do on your own when you go from a higher level language (like python) to a lower one (like C/C++). I’d say mentally prepare yourself to have to think a lot more in the planning phase of your programs, especially about what kinds of data will be needed and where, because C++ is a strongly typed language so you’ll have to be specific in your declarations of variables
@@ugib8377just realized I answered a question you didn’t really ask lmao. As someone who started with C++ on my own, then Java then C in college, I would say that the order doesn’t really matter so much as learning each language correctly and understanding different programming design patterns. Knowing C at all is maybe the best thing you can do. It makes you a much better programmer in any other language because it forces you to do so many things on your own and you really have to break problems down to the level the computer works at. It will definitely help you appreciate (and be able to better take advantage of) the convenience of other languages and Object-Oriented features.
somehow my programming education started with C then moved to C++ then C# and I didn't go insane
you got it wrong, i'm not suicidal. i'm psychotic.
for me if you are a complete beginner learning c++ might be hard but if you understand it you basically understand most if not all other programming languages, just the syntax will differ
C++ is my official first language. I learned a bit of Python like variables, loops, if-else, lists/arrays, but I wouldn't consider it my first. C++ isn't that hard.
You clearly don't understand C++.
@@toomanyhobbies2011 And you do? Stop considering that it's universally difficult because it's difficult to you or you have seen videas claiming it's difficult.
Maybe for a God, but for us mere mortals, C++ is brutal ...
@@tomasstana5423 You just need to put more effort into it. It's definitely doable and in my opinion it teaches you more than easier languages. That's my opinion tho.
@@tomasstana5423 HHHHHHHHHHHHHHHHHHHHHHHHH
"Use C# if you want a job."
«C++ is used in CIA torture program” 😂
I wanna see more of this guy pretending to know what he is talking about :3
More soon!
Sehr gutes und lustiges Video, später wenn du erfolg hast kann ich einmal behaupten ich war von anfang an dabei.
As a programmer the thumbnail scared me away. Your takes are brilliant
"I would not recommend this language to beginners"
Is that a challenge I hear
from what I've seen/read, compilers like Clang/LLVM is written in C++ and GCC leans more and more towards C++ nowadays. So major compilers use C++ and not C, if I am not mistaken.
This is true, although originally C++ wasn't truly compiled but rather translated to C, and then passed into a C compiler.
As C++ because a 'stronger' language (for lack of a better word) a C++ compiler became more doable, until eventually it took over, largely due to the fact you don't need a lot of the low level benefits of C for a compiler, and some higher level concepts such as strings are useful for compiler development.
GCC absolutely does not lean towards C++, most of its source has only barely been edited enough to be passed through a C++ compiler. At best, it uses a very C-like subset of C++ for most of its source code. Also, to quote the man himself:
"C++ is a badly designed and ugly language. It would be a shame to use it in Emacs. The reason the GCC developers wanted to use it is for destructors and generics. These aren't much use in Emacs, which has GC and in which data types are handled at the Lisp level." - rms
1:09 - 1:13 This part killed me xD
Now we're waiting for a C♭.
I learned programming on a very basic level in school with Pascal and Delphi, ended in a job were I coded html on a even lower lever (basically just textformatting), decided I wanna give game development a chance, and use Godot. Find out I forgot most of what I knew (which wasn’t much to start with) And decided I should „brush up on the basics“. Enrolled into cs50x and now I am learning C … instead of c++ or c# which would’ve actually been more useful. ^^D
I feel like I am doing something wrong… but as long as I fail forward…
I write mostly C# and when I have to go back and use Java it's easy to understand why C# exists. To call it a copy of Java seems like a bit of stretch but that being said C#'s syntax definitely borrowed ~some~ cues from Java but did it better, imo.
That's my problem. People who don't know the languages will look strictly at the syntax and say, "hey they look the same." This just proves those people have not looked any further into it. Once you actually learn both languages they couldn't be more different from each other. This myth of C# being a Java clone is only believed by those either not knowing C# or not knowing Java.