C Is Obsolete

  Рет қаралды 169,514

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Reviewed video: • Bjarne Stroustrup: Why...
Channel: Big Think | / @bigthink
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/dee...

Пікірлер: 1 000
@CastToVoid
@CastToVoid Жыл бұрын
If you've ever done ANY serious embedded programming, you'll know C is far from obsolete
@themohmand
@themohmand Жыл бұрын
I work in developing software for embedded devices and C is by far the most widely used language in this industry
@blobglo
@blobglo Жыл бұрын
Exactly! And personally I find C easier
@Nisstyre56
@Nisstyre56 Жыл бұрын
plus embedded frameworks like FreeRTOS, ZephyrOS, etc actually make it EASIER to program stuff like concurrent applications on embedded than desktop, IMO.
@thunderdeer6073
@thunderdeer6073 Жыл бұрын
It’s C or ASM so that’s a pretty easy choice
@fededevi1985
@fededevi1985 Жыл бұрын
Well that's your only choice
@seifparole6672
@seifparole6672 Жыл бұрын
Yes, after years of programming, I've realised that data types, functions and loops are enough in 99% of cases.
@LawlessSentry
@LawlessSentry Жыл бұрын
I remember Linus Torvalds said that programming is all about manipulating data, which i agree with 100%. You have one data format and you just convert it to another format, that's it.
@curlyfryactual
@curlyfryactual Жыл бұрын
​@@LawlessSentry and then you segfault due to a failure to specify domain :(
@shaurz
@shaurz Жыл бұрын
All the other junk just gets in the way really.
@dabeda17
@dabeda17 11 ай бұрын
And Boolean logic.
@Muskar2
@Muskar2 10 ай бұрын
​@@curlyfryactualI've heard that meme, but never understood it. I think segfaults are as hard to solve as null pointers or off-by-one errors. All I've ever seen needed is asserts, sane allocation like arenas or ring buffers, a debugger and sometimes an address sanitizer.
@StevenOBrien
@StevenOBrien Жыл бұрын
Barney Starsoup: "C only has datatypes, functions, and that's it" C Programmer: "Yes"
@SzBenedek2006
@SzBenedek2006 4 ай бұрын
Yes, and we like it
@realdragon
@realdragon 4 ай бұрын
And even then there's a lot to learn and a lot of nuisance
@ZTYUu0Z
@ZTYUu0Z 3 ай бұрын
binary offers more... if you know the way of the machines
@ty.davis3
@ty.davis3 3 ай бұрын
Barney Starsoup? Am I late to the game, like is this a well known name for the guy because no one else reacted in 8 months
@xerathgaming1915
@xerathgaming1915 3 ай бұрын
@@ty.davis3 creator of the worst programming language
@user-goohanbeom
@user-goohanbeom Жыл бұрын
C is the easiest way to understand how software interacts with hardware. Just right amount of abstraction and technicality for beginner.
@michaelzomsuv3631
@michaelzomsuv3631 Жыл бұрын
C is what powers 96% of the internet. 96% of the internet being powered by linux servers, which is C.
@MelroyvandenBerg
@MelroyvandenBerg Жыл бұрын
@@michaelzomsuv3631 If you talk about the Linux kernel sure. But there is more then the kernel.
@ForeverZer0
@ForeverZer0 Жыл бұрын
I just wanted to make a comment before the first "akthually" redditor shows up to talk about Assembly and how even it is too abstracted nowadays.
@student99bg
@student99bg Жыл бұрын
That's true though
@mgord9518
@mgord9518 Жыл бұрын
​@@michaelzomsuv3631COBOL powers about 70% of businesses. Obsolete doesn't mean no longer used, it means that there are better options for writing new software.
@thingsiplay
@thingsiplay Жыл бұрын
"His hair is obsolete" got me.
@Elfcheg
@Elfcheg 7 ай бұрын
GOT'EM
@therevanchist8967
@therevanchist8967 4 ай бұрын
💀
@Thyringer
@Thyringer Ай бұрын
My professor for technical information technology once said in a lecture: "Björn Stroustrup looks like his language." in reference to his hairstyle. lol He definitely didn't like C++
@thingsiplay
@thingsiplay Ай бұрын
@@Thyringer lol good one too. :D A professor with such a statement is trustworthy in my opinion. I'll steal this one and wait for a good opportunity. :D
@bissnickss345
@bissnickss345 Жыл бұрын
When I heard my friend saying that C is the language that they use for programming 1 & 2, I've wonder why they would use an old language when we have python which is easy to use and easy to understand? but once I got on the same university and learned C, now I know how important it is.
@Akronymus_
@Akronymus_ Жыл бұрын
IMO python isnt actually any more easy. Sure, you dont have to manually manage memory, but you need to learn many more concepts in lisp than c
@askeladden450
@askeladden450 Жыл бұрын
​@@Akronymus_its not about learning language syntax. Thats by far the easiest part of learning any language. You can just google it. Its about the patterns and methodologies thay you have to master. Just being moderately competant in managing manual memory requires you to read atleast several books (scott meyer's are really good btw).
@Sefriol
@Sefriol Жыл бұрын
For sure. Though, our programming 1 and 2 were in Python which was followed by C-programming course. I think it was the perfect balance. You learned the basics of arrays, strings, ints, loops etc with relative ease and you got something done very short period of time. Then you started bashing your head against the wall with SegFaults. I think I might have quit my University degree in Computer Science if I started with C :D
@taragnor
@taragnor Жыл бұрын
C is okay for an introductory language. It's really the one place I'll say that it definitely beats out C++, which is quite possibly the worst introductory language (though in competition with Rust probably). The thing is that iostream makes C++ incredibly difficult for a beginner. In C you say "okay, I'm passing arguments to a function". With cout you're bitshifting strings into... something to create output somehow. Yeah I know how cout works now because I understand overloading but as a beginner programmer this thing is as cryptic as you can get. I feel like people might not hate C++ as much if iostream hadn't been this mess of "lets show off how you can overload operators!" And I mean I understand how that works, when I first learned about overloading in C++, I was the guy who created a stack with pop as the -- operator and used plus to push the stack. I've done my own atrocities with operator overloading.
@bugs-bunny-k6g
@bugs-bunny-k6g Жыл бұрын
@@taragnor cout
@esra_erimez
@esra_erimez Жыл бұрын
Fun fact: When my dad was a kid, he called Dennis Ritchie in Murray Hill, NJ and Mr. Ritchie took the time to answer the question in detail. By the way, this was when state to state calls were long distance and my grandparents had a sit down with my dad when they got the phone bill.
@tsalVlog
@tsalVlog Жыл бұрын
.. this has either happened more than once, or I've met your dad.
@ryanleemartin7758
@ryanleemartin7758 Жыл бұрын
amazing!
@delicious_seabass
@delicious_seabass Жыл бұрын
That's awesome! I imagine Dennis got a lot of calls back then. In my career, I've been fortunate enough to either meet or be on a call with various people of notoriety. Its always great to meet people like that, if only to get a chance to learn a little from them.
@orbatos
@orbatos Жыл бұрын
​@@tsalVlogTo be fair I'm sure it has happened more than once.
@tsalVlog
@tsalVlog Жыл бұрын
@@orbatos Oh I'm certain it's a coincidence! I had a professor that worked with him at Bell Labs many years ago, who told a lot of stories about him, it's possible I heard it third-hand and not second-hand.
@PhilipAlexanderHassialis
@PhilipAlexanderHassialis Жыл бұрын
When you pass your initial stage of "programming how does it work", then it's time for "The C Programming language". A small book, for the greatest of languages. "C isn’t a big language and as such, a long book wouldn’t serve it well". Just read *very carefully* K&R kids. Study it. Work on the exercises. Work on the examples. Create some miniature applications. You will get to learn the true fundamentals, all of them. No programming language will hold secrets from you from that point on. All the skills you will acquire will be directly applicable and transferable to everything from Go & Rust & Zig/Nim, to JS/TS, to Java and C# even - and then, to a deeper understanding of the OS that will allow you to master your environment and enjoy programming much more. Learn C. Your future self will thank you.
@AlJay0032
@AlJay0032 Жыл бұрын
Exactly, and sorry a language that takes over a 1000 page book to explain and has no proper semantics like C++ I cannot take serious. It's ridiculous.
@hoi-polloi1863
@hoi-polloi1863 Жыл бұрын
I still have my 1989 copy of K&R! It gives me fond memories. Should have it bronzed... ;D
@AlJay0032
@AlJay0032 Жыл бұрын
@@hoi-polloi1863 Me too.
@zeckma
@zeckma 11 ай бұрын
I have a great deal of knowing how my system works in part because of C, but mostly the principle it gives: work with hardware, work low level. Most of the packages needed to make my system function are written in C. I can take a look into the source code, understand it, it's simple. Stuff written in C++? Yeah no thank you.
@exorg1163
@exorg1163 8 ай бұрын
Objectively correct take
@brianb2308
@brianb2308 Жыл бұрын
C will never be obsolete because it's the best language to reverse engineer assembly into (given that the program was written in a compiled language, and even sometimes if it was written directly in assembly)
@SmallSpoonBrigade
@SmallSpoonBrigade 11 ай бұрын
From what I can tell, the only languages that ever go fully obsolete are ones that never caught on in the first place. There's still jobs for languages that "went obsolete" years ago, but are still being used in legacy applications because they can't justify rewriting the code in something more modern.
@neruneri
@neruneri Ай бұрын
@@SmallSpoonBrigade Is this a COBOL mentioned? Did I just hear COBOL mentioned?
@mattmurphy7030
@mattmurphy7030 20 күн бұрын
@@nerunerieither COBOL or FORTRAN
@EbonySeraphim
@EbonySeraphim Жыл бұрын
C’s lack of “features” is why it’s far more straightforward and a smaller task to implement a compiler for some new embedded platform with a new chip. Outside of assembly, C is absolutely going to be an available language to execute code on some hardware. C++, sure not too far behind in a lot of cases that matter, but not everywhere.
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
Except it's a smaller task to implement a C compiler for some new embedded platform by adding support in something like GCC instead of reinventing a wheel. Also the only reason to create a new embedded platform is to make idiot Cniles pay for a yet another compiler license because it will obviously be proprietary.
@I_stole_your_cheese
@I_stole_your_cheese Ай бұрын
True: the minimal things that C has can do more if you know how it works. python is kinda like a sports car while C is a belt excavator.
@mattmurphy7030
@mattmurphy7030 20 күн бұрын
@@I_stole_your_cheesepython like a sports car…hahahahahah C is a sports car: fast, minimalistic. Python is a tractor: slow, useful.
@I_stole_your_cheese
@I_stole_your_cheese 19 күн бұрын
c@@mattmurphy7030 Good luck writing an operating system with python then. it is slow and while versatile in terms of data analysis on web development it is not comparable to how much C allows you to do on your computer.
@I_stole_your_cheese
@I_stole_your_cheese 19 күн бұрын
wow this is my first time properly arguing online
@joshk4372
@joshk4372 Жыл бұрын
I write C professionally. Sometimes I fantasize about C++, then I read some and remember I hate C++. But I also recognize its benefits. But both git and linux are mostly C. So it has its place and influence. What would be nice is if C had a better standard library, with things like hash maps and sort.
@eckelfresh
@eckelfresh Жыл бұрын
True. I wrote c for professional some years. Now I am writing Rust code for my job. And I am so glad, that I learned C before Rust. C has the basics, where I can do many things. But I wish, that c got some stuff from higher languages like hashmap, sort, iterators or closure. When I tried c++ in the past, it was a pain in the arse. It was always hard to get it compiled, the linker was annoying, no Tipps from the compiler, and it feels always like Frankenstein's monster. Every new concept put into it. Doesn't matter, if it fits. I hate c++.
@owenwexler7214
@owenwexler7214 Жыл бұрын
I think Postgres is written in C too yes?
@hansisbrucker813
@hansisbrucker813 Жыл бұрын
I know you're probably on Linux, however do you happen to know what the best pure C compiler is for Windows? Should I use MingW32, Clang, or perhaps even the C compiler shipped with Zig? 🤔
@eckelfresh
@eckelfresh Жыл бұрын
@@hansisbrucker813 on Windows, I made good experince with the mingw compiler. But some people like clang. Try by yourself :)
@sociocritical
@sociocritical 11 ай бұрын
Actually qsort is in libc.
@delicious_seabass
@delicious_seabass Жыл бұрын
Thats funny, because I still use C exclusively to this day and can do practically anything with it.
@tehseensajjad1003
@tehseensajjad1003 Жыл бұрын
To do what?
@Runeite51
@Runeite51 Жыл бұрын
how to use c in the stead of php? :) right now I'm using a subshell, i don't know enough to figure out any other way :\
@Runeite51
@Runeite51 Жыл бұрын
and I mean mean for a web server, like a web site to be visited by others on a browser
@dakata2416
@dakata2416 Жыл бұрын
@@Runeite51 as far as i know the php runtime is written in C
@Runeite51
@Runeite51 Жыл бұрын
​@@dakata2416yes it is ._.
@FanatiQS
@FanatiQS Жыл бұрын
Designated initializers from C99 were not added to C++ until C++20. I have seen people argue for constructors, but that is not a replacement since I might want to initialize a single struct in multiple different ways. Sounds like the "I have argued for compatibility" is more a "C should not add features that don't exist in C++" since if he really wanted compatibility, C++ would have added all C99 features in C++03. To me, "the languages should have been merged into one" just sounds like "why did they keep working on C when they could have worked on MY project instead"
@DelgardAlven
@DelgardAlven Жыл бұрын
L o L
@robrick9361
@robrick9361 Жыл бұрын
Bjarne is not Guido van Rossum. He doesn't have final say on C++ anymore. There's many things which have happened that Bjarne doesn't like in C++. Also they couldn't add C designated initializers because C++ members are constructed in order and may depend on previous initialized members. This isn't a problem in C structs. Which is why C++20 designated initializers are actually a restricted version of C's designated initializers. You can't initialize the members out of order in C++20. Maybe they might make an exception in the future if the struct is plain old data like C structs, but this requires research as changes like that effect the entire language grammar.
@ElPikacupacabra
@ElPikacupacabra Жыл бұрын
Bjarne doesn't want physicists to become hardware level memory allocation experts. He wants them to become experts in weird C++ syntax. I'd rather understand a pointer 1000 times than figure out which between the rule of 5, the rule of 3 or whatever applies in a certain case, or what the distinction is between lvalues, rvalue and lrvalue. Also: it is well known that physicists love debugging templates. 🙂 True story!
@q1337
@q1337 Жыл бұрын
😂 Imagine you are a physicist and you are programming in C or Cpp, wasting more of your precious time instead of getting a dedicated Cpp professional on your team to do everything properly. There is a reason the profession exists.
@Tuniwutzi
@Tuniwutzi Жыл бұрын
I think his point was more that in C++ you could create a library with abstractions that can then be used by people who don't have an expert-level understanding of the language or the inner workings of the library. Whereas in C, you often just don't have the abstraction tools for that. I'm not sure I agree with this argument myself, but I feel like you're arguing against a point he didn't make.
@ElPikacupacabra
@ElPikacupacabra Жыл бұрын
@@Tuniwutzi Is that really the case though? Have you ever been able to use C++ without needing to understanding obscure C++ syntax? For better or for worse: code is used as its own documentation, and you can't hope to code even applications of libraries without getting your hands dirty and trying to understand the library. What Bjarne is imagining is a situation more like when using python.
@q1337
@q1337 Жыл бұрын
@@ElPikacupacabra I agree, python is python and cpp is cpp, I can't see a situation where cpp is simpler than python.
@Tuniwutzi
@Tuniwutzi Жыл бұрын
@@ElPikacupacabra as I said, I'm not sure I agree with the argument. I do think there is a nugget of truth in there, especially when it comes to management of resources which can be automated/abstracted very nicely in cpp via ctors and dtors. But on the whole I mostly agree with you. I just felt like your original argument didn't attack the point that was being made.
@T1Oracle
@T1Oracle Жыл бұрын
Communicating with a computer is easy. Communicating with other people is hard. If your problem domain doesn't require fancy abstractions, then your language doesn't need them. However, when they do benefit your inter-engineer communication, then you need a higher level language. Regardless, as long as a language is Turing Complete, you can do everything in it. The only difference is how much effort it will take, how it will perform, and how difficult it will be to read.
@Heater-v1.0.0
@Heater-v1.0.0 Ай бұрын
"Communicating with a computer is easy. Communicating with other people is hard" I'm inclined to agree. However C++ does not help much with the latter. At the same time it does not fix any of the issues we have with C, memory safety etc. All in all C++ is a an ever growing disaster.
@artimdutton
@artimdutton Жыл бұрын
C Is Obsolete the same way a shovel is obsolete....
@ShadowKestrel
@ShadowKestrel Жыл бұрын
if C++ good why no linux :think:
@thomassynths
@thomassynths Жыл бұрын
Because of inertia, bad early c++ compilers, and irrational fears. C sucks compared to C++ these days
@bugs-bunny-k6g
@bugs-bunny-k6g Жыл бұрын
​@@thomassynthsI agree, C sucks in comparison to C++, but if you limit yourself to a subset of C++ as the language accumulated lots of garbage because of backward compatibility
@Vivraan
@Vivraan Жыл бұрын
One could just stick to a standard and go from there
@jaysistar2711
@jaysistar2711 Жыл бұрын
​@@thomassynthsYou could also write a C compiler if you think about it a bit. A C++ compiler is a nightmare to write.
@thomassynths
@thomassynths Жыл бұрын
@@jaysistar2711 C is not a walk in the park to parse either. It’s actually very hard to parse properly. Just use clang for all ast stuff for c and c++
@yaazarai
@yaazarai Жыл бұрын
As someone who just rewrote their Vulkan Renderer in C (porting from C++), I can firmly say C is freeing from the hell of C++. Even if it takes me twice as long to do anything.
@misium
@misium Жыл бұрын
I mean, you kinda contradict yourself there...
@starrider6590
@starrider6590 Жыл бұрын
@@misium 20 minutes of not-so-bad hell vs 10 minutes of hell, call it.
@asandax6
@asandax6 Жыл бұрын
@@misium it's a matter of would you stand on 50 C of water for 10 minutes vs 5 minutes in 100 C?
@majormalfunction0071
@majormalfunction0071 10 ай бұрын
Writing a game in C. Vulkan calls runs on a fiber-based job system. When doing weird things, C gets out of your way if you ask nicely. C to Assembly ABI is simpler than a C++ to Assembly ABI.
@insiderich7372
@insiderich7372 10 ай бұрын
​@@majormalfunction0071Exactly! Lack of type safety lets you cast and recast away to heart's content (and burn yourself badly doing so...yes I am thinking of you my SIGSEGV)....that IS the defining feature..that and pointers...... When I learn C++, I have to keep reminding myself, these folks HATE casting (and go to insane lengths to ensure type safety though I understand the why of it), and they HATE pointers so much that they just want to hide in one of 100000000 abstractions the language has......
@isodoubIet
@isodoubIet Жыл бұрын
C++ has some keywords that are not keywords in C, which means a C program that contains identifiers named "class", "module", "throw" etc will be ill-formed as a C++ program. The C++ type system is also stricter, so for example you can't just assign the result of malloc to a pointer, you have to cast it first. C also developed on its own on a rather different direction than C++, which means it got some features meant that C++ solves in other ways, or that are incompatible with how C++ solves some other problems. For example, in C99 it's legal to have arrays of variable length, even in a struct as long as it's the final member. In C++ all built-in arrays must have size known at compile time (we have vector for this, so we don't need to fiddle with the complexity of variable length arrays and how it would interact with other language features). C99 lets you initialize structs by naming their members e.g. {.a = 1, .b = 2, .c = 3}. C++ also has this feature, but it's more limited since the C++ object model ties lifetimes with lexical scope, which means that the fields must be given in the same order as they're declared in the struct definition. It's like C and C++ are two different romance languages. Still obviously related, but not so much that one reads directly as the other.
@ghosthunter0950
@ghosthunter0950 Жыл бұрын
If we had a language that was something between C and C++ it would have been amazing. Keep everything nice about C but add in the core features from C++ that clearly improve on C but without the other nonsense.
@CARPB147
@CARPB147 Жыл бұрын
@@ghosthunter0950 Perhaps that's where *Zig* comes in...
@isodoubIet
@isodoubIet Жыл бұрын
@@CARPB147 Zig's lack of RAII makes it not a contender in that space. Maybe Zig++.
@arden6725
@arden6725 Жыл бұрын
@@isodoubIet Zig has RAII as the primary pattern for custom allocated datatypes
@isodoubIet
@isodoubIet Жыл бұрын
@@arden6725 Since when? AFAIK the language doesn't even have destructors and this is a very intentional design decision.
@demolazer
@demolazer Жыл бұрын
C can't become obsolete. So much of the software we use every day is written in it. We'll always need people who know C.
@fcolecumberri
@fcolecumberri Жыл бұрын
By that logic... Cobold. A lang being obsolete is not incompatible with being legacy. I am not arguing that c is obsolete, btw.
@mgord9518
@mgord9518 Жыл бұрын
A language being obsolete doesn't mean it goes away. Obsolete means that there are better options for new code. Yes, C programmers will probably be needed for at least the next 5-10 decades, that doesn't mean that C isn't obsolete. COBOL programmers are still paid well because they're needed to maintain legacy software, are you gonna argue that COBOL isn't obsolete?
@novarem9828
@novarem9828 Жыл бұрын
Alot of popular software is written in C because there was no better alternative at the time. Picking C for anything non embedded in 2023 is just idiotic.
@TheFern2
@TheFern2 11 ай бұрын
I think most people have zero clue where c is used, they just think old=obsolete. Python, linux kernel, just about any db, embedded, all written in c. One aspect of c that many people have no clue is that many libraries are written in c then wrappers built for other languages. No other language can be as portable as c.
@TheFern2
@TheFern2 11 ай бұрын
​​@@novarem9828you can't write redis in any other language and create wrappers like in c, that's why c is used. It isn't just availability that you need to worry as much as portability.
@theondono
@theondono Жыл бұрын
It’s funny that he says “I’ve argued for compatibility” when it’s mostly the C++ work group who refuses to do things in compatible ways, and who approved changes *and then* lobbies the C work group to do the same with the argument of “compatibility”, even if that new feature will cause *lots* of troubles for C users.
@michaelzomsuv3631
@michaelzomsuv3631 Жыл бұрын
It's for this reason that I think C23 is total dogshit. It has already went too far in the C++ compatibility direction. It's a shame but at the same time older C versions are never going away so I'll just stick with the better C versions.
@theondono
@theondono Жыл бұрын
@@michaelzomsuv3631 What specifically of C23 do you think has that issue? Some of the stuff of C23 is going to solve pain points I've had for years (#embed looks great).
@xhivo97
@xhivo97 Жыл бұрын
​@@michaelzomsuv3631why? I actually like c23.
@fullaccess2645
@fullaccess2645 Жыл бұрын
@@michaelzomsuv3631 whats so bad about C23?
@skaruts
@skaruts Жыл бұрын
Maybe that's why he had to argue for compatibility.
@colemichae
@colemichae Жыл бұрын
C is alive, yes he is pained. C is strong still Rust is new has some advantages but it has to stop being Political internally.
@tordjarv3802
@tordjarv3802 Жыл бұрын
Technically C:s restrict keyword (telling the compiler that two pointers do not point to overlapping memory) is not officially part of the C++ standard because it is not clear how it should work with abstract classes and other OO stuff. However, many C++ compilers implements a version of the restrict keyword but there is no guarantee that it works in the same way between different compilers so if you use it you basically become compiler dependent.
@dakata2416
@dakata2416 Жыл бұрын
If ony C had a generic types or something like Zigs comptime & some kind of "smart pointers" it would be great.
@erdanxiloscient3666
@erdanxiloscient3666 Жыл бұрын
It's not "smart", but I believe 'void *' acts as a generic pointer
@mgord9518
@mgord9518 Жыл бұрын
​@@erdanxiloscient3666It's not generic, it's type-erased. Yes, you can put any kind of pointer into a "void*" function, but you have no way of finding out what kind of data was passed without some sort of runtime reflection. In Zig, you can process whatever was passed to an "anytype" function and easily cause a compile error if the type isn't usable in the function.
@bitskit3476
@bitskit3476 Жыл бұрын
I'm primarily a C programmer, and while there are some places that I think the language could be improved, I think that most alternative languages take the abstractions too far. Things I'd want in C would be stuff like stronger typing, a simpler operator precedence, removing default return values for typed functions, implicit header guards, scoped headers, letting `.` reach through pointers, having defer statements, etc.
@yurilsaps
@yurilsaps Жыл бұрын
I learned defer in go, it’s really cool. The other things I have no idea what you meant
@bitskit3476
@bitskit3476 Жыл бұрын
@@yurilsaps in C, everything is an int by default. An effect of this is that something like ``` x; main() { printf("%i ", x); } ``` is a valid C program. It declares a global variable called "x" as an int and then a function called "main" that takes an unspecified number of arguments and returns an int. Which begs the question of *what is "main" returning,* to which the answer is "0". That's the *default return value* for all int-typed functions. This behavior can cause bugs that are a huge pain in the ass to figure out. The fact that things default to a type of "int" is the main reason why "void" exists. It essentially does type erasure. It's also why you have declarations like "unsigned x; or "long y;". The "int" part is implicit. Another snippet of perfectly valid C code would be ``` sumof(); main(argc, argv) char *argv; { printf("%i ", sumof(true, 2, 0.5, NULL)); } sumof(x, y) { return x + y; } ``` This works because empty parameter lists signify an unknown arity (i.e. number of parameters); with each potential parameter being of an unspecified type. You could pass the "sumof" function *literally anything* and the compiler won't complain. To make it do proper type checking, you need to declare the sumof function as "int sumof(int x, int y);" or perhaps "int sumof(void)". C is largely weakly typed as well, so a value of "6" will implicitly cast to a bool or char and vice-versa. This makes it quite easy to screw something up by passing arguments to a function in the wrong order or something. Then as far as arithmetic operations go, the general order of evaluation is suffixes, then prefixes, then infixes; but you'd be surprised to know that relational operators like < or
@jal051
@jal051 11 ай бұрын
It would be nice if a couple of things were made simpler. Like setting up projects, haha. I hate the proccess of linking libraries in C where most of the times you end up having to recompile them (that's not different in C++, tho). Also, having easy string management wouldn't hurt. That's not something where I feel I need the nitty-gritty detail. But other than that, it's the language that doesn't hide things from me, and I love that.
@bitskit3476
@bitskit3476 11 ай бұрын
@@jal051 if you're having to recompile libraries, I'd assume that you're probably on windows. On Linux, installing packages is a lot simpler because you have package managers like apt and pacman. I normally use makefiles for all of my projects, and there's a sort of "template" I can do from memory that handles packaging, installation, and unit testing. Really, the only time my projects start to get complicated is when there's platform specific code. For example, in my cgame engine, there are different backends for windows, posix, psp, www, etc. The way that I currently implement it is that I have a variable called HOSTOS that tells the main makefile to include some other makefile that specifies the name of the binary and adds certain object files, linker flags, and rules. Most people don't want to take the time to learn make though, for whatever reason. That, or they keep trying to use GNU specific extensions and bashisms. Which is why autoconf/automake was made; and that's an even bigger pain in the ass to mess with, which is why cmake was made. Not really a fan of cmake though.
@zZGzHD
@zZGzHD 10 ай бұрын
Sounds like you'd like Zig.
@GarrethandPipa
@GarrethandPipa Жыл бұрын
c will never be obsolete. The financial system is built on c the billions spent already would have to be rewritten to the tune of trillions. And banking and software the mantra is "if it ain't broke don't fix it. ".
@SerBallister
@SerBallister 11 ай бұрын
COBOL is still in use in some parts of the financial system.
@alfredonovoa8124
@alfredonovoa8124 Жыл бұрын
If you remove all the bad parts from C++ then you have something very similar to C.
@IBelieveInCode
@IBelieveInCode Жыл бұрын
Agreed.
@isodoubIet
@isodoubIet Жыл бұрын
Not remotely. Removing the "bad parts" from C++ would remove most of the C subset.
@lucasscholles688
@lucasscholles688 Жыл бұрын
Honestly the biggest problem of C++ is backwards compability, which means C
@thomassynths
@thomassynths Жыл бұрын
RAII is C++'s greatest strength, and C has nothing like it.
@alfredonovoa8124
@alfredonovoa8124 Жыл бұрын
@@thomassynths Not very useful if you don't have exceptions and exceptions are problematic.
@jubjub727
@jubjub727 Жыл бұрын
When dealing directly with memory C is unparalleled. That's a large amount of what I do so C or C++ (used more like C and ignoring modern features) is my only practical choice most of the time. Also if you want to interact with C++ it's so much easier to be using C++ or C (which one depends on what you're interacting with). Compiler optimisations can make it really hard to manipulate machine code but C or C++ configured can make that far easier to manage as well. Niche use cases sure but they're most of my use cases. For the record I mostly do game modding/cheating/anti cheat/anti virus/malware/os modding stuff. Similar techniques throughout all of that work and I use a lot of reverse engineering so I'm thinking more about machine code than high level programming concepts. Somewhat unrelated but 64bit calling conventions hurt my soul :(
@AlFasGD
@AlFasGD Жыл бұрын
It feels slow productivity-wise. Other than that, if you enjoy typing keys in your keyboard and think through everything step-by-step like traversing the tree pre-order, C is almost perfect for you, if you except for the linker errors and how you import libraries.
@hereandnow3156
@hereandnow3156 7 ай бұрын
I've spent most of my time using C++, the words "linker errors" makes me shudder.
@taggosaurus
@taggosaurus Жыл бұрын
Wojak tries to start a personal project in C, 5 minutes later: "Oh shit, it doesn't even have std::vector".
@snippletrap
@snippletrap Жыл бұрын
Just implement your own, no biggie
@Asto508
@Asto508 Жыл бұрын
@@snippletrap and then you realize you need it for a few primitive types and then some more for your own structs. Usually people stop at this point and create global arrays statically allocated and use it everywhere, later running into segfaults or memory leaks as they lost track of what goes on where. C is clearly superior.
@snippletrap
@snippletrap Жыл бұрын
User error@@Asto508
@BrunodeSouzaLino
@BrunodeSouzaLino Жыл бұрын
@@snippletrap Sure. Will you implement std:vector for every single data type you want it using macros because C doesn't have templates?
@snippletrap
@snippletrap Жыл бұрын
@@BrunodeSouzaLino Yep, no problem
@lMINERl
@lMINERl Жыл бұрын
Programming languages are like tools you use the right tool for the right job, thats why most embedded systems are in C , gaming in C# and C++ for faster development itterations , web in JS for minimal bundling, there is no perfict language Edit : dream bird is a perfect language to secure your job for next 20 years
@q1337
@q1337 Жыл бұрын
There is no perfect language, however I vote to consider JS as a separate imperfect language.
@shadamethyst1258
@shadamethyst1258 Жыл бұрын
He didn't delete the repo, he renamed it to C
@tedg1278
@tedg1278 Жыл бұрын
There is a perfect language though...Rockstar.
@gregorymorse8423
@gregorymorse8423 7 ай бұрын
Actually you are wrong. There is a perfect language for any given task. It's the meta description of the lowest Kolmogorov complexity code with the lowest time complexity for solving whatever problem. Very simple mathematically grounded definition based on compressibility.
@hanzofuma
@hanzofuma Жыл бұрын
I like C even tho I don't use it often especially for education. If I want to learn some low level computer science concepts there is nothing better than C. I like to write 500 lines of code just to implement a Hash Table or create my own malloc function. It's really great for learning because the less abstractions you have to deal with the clearer the concept becomes but for productivity C++ or other languages are more comfortable to use.
@jethalalrox1175
@jethalalrox1175 Жыл бұрын
yeah but with c++ you can get best of both the worlds . If you dont use classes it's fine write the whole program procedurally and where you require classes you can use it. what people don't get is that c++ is just an extension of c it's not trying to overcome c. it's literally c with classes. IMHO c++ is the best language when it comes to embedded and general low level programming.
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
Sorry that's too complicated for absolute god tier geniuses who only know a bit of C.
@krox477
@krox477 Жыл бұрын
If C is obsolete then I'm living in 2100
@ZTYUu0Z
@ZTYUu0Z 3 ай бұрын
nah, just 2077
@BarriosGroupie
@BarriosGroupie 10 ай бұрын
I agree with all your points. C was created to make programming at the hardware level better documented and more readable; and it does a great job in this respect. C++ likewise has a level of abstraction that is useful for some people, but isn't needed in most cases. Hence C will, and should never, become obsolete because it does a fantastic job that's needed by parts of the programming industry.
@ZTYUu0Z
@ZTYUu0Z 3 ай бұрын
we need to evolve, we cannot keep using C forever, it is not perfect, it just worked for a very long time, by that line we should operate in 0 and 1, which is the ultimate reduction, but that doesn't mean it is better
@yaksher
@yaksher Жыл бұрын
The thing with, say, C is that when you do a subscript on something, or you access a field, or whatever, you know what this operation is doing and more importantly you know that it's just giving you some data. It's not running funky code, it's not running expensive code, and it certainly doesn't have side effects. You know that every operation is simple and specific and if something is expensive then it's a function call. This has upsides and downsides. The upside is that, well, you're never surprised by something being a computation, or by having side effects, or whatever else. The downside of course is a lack of expressiveness. Sometimes, subscript is the appropriate operator. But there's no guarantee that when you subscript, it's a cheap operation which should be a subscript.
@yxtqwf
@yxtqwf Жыл бұрын
I hate how this guy ignore any actual criticism of C++ just because he was friends with Dennis Ritchie and Brian Kernighan, when many of the criticisms came also from people like Ken Thompson and Rob Pike.
@ea_naseer
@ea_naseer Жыл бұрын
i thought they laughed at C++ in Bell Labs when it came out the first time.
@robrick9361
@robrick9361 Жыл бұрын
The title is BS, he's saying that C AS A SEPARATE LANGUAGE IS OBSOLETE because he designed C++ to extend C, not replace it. Bjarne always wanted C to become a plate of features you take from the C++ buffet.
@yxtqwf
@yxtqwf Жыл бұрын
@@robrick9361 That's even worse. He wants C to be swallowed up by the monstrosity that is C++.
@finnr3472
@finnr3472 Жыл бұрын
C isn't a subset of C++ due to e.g. restrict (not in C++) or auto (completely different meaning in C++).
@Kane0123
@Kane0123 Жыл бұрын
Can’t wait to see the bald cap ProgrammersAreAlsoHuman has to wear to mock C.
@sarjannarwan6896
@sarjannarwan6896 Жыл бұрын
I've been learning more C recently. Not because it's going to help at work or with getting a new job. But because as a learning tool, it's not obsolete. For most tasks, I think there are probably a bunch of modern languages with much nicer package managers(
@FlanPoirot
@FlanPoirot Жыл бұрын
the nice thing about C though is that every language interops with it, it's the standard for performance, it runs on any architecture you can think of, with or without an operating system and it's binary size is generally much smaller than every other programming language's. After learning the few quirks of C and learning how to debug and using sanitizers, imo, C becomes very enjoyable (for the most part) and you don't run into too many segfaults or other issues that often. The elephant in the room tho is that build systems on C land suck, but I've recently been using meson instead of make or cmake and honestly it's very comfy
@lauraprates8764
@lauraprates8764 Жыл бұрын
For some areas (like embedded) C is the de-facto standard and probably won't fadeaway soon
@0marble8
@0marble8 Жыл бұрын
I have a chemistry student friend, who knew nothing about programming, he had a c and a python class, and said c was more understandable, ofc maybe it just came down to what teacher explained it better
@BrunodeSouzaLino
@BrunodeSouzaLino Жыл бұрын
Considering Python is implemented in C, doesn't make much of a difference.
@mage3690
@mage3690 5 ай бұрын
I always thought C was more understandable, but that's because I get weirdly hung up when I don't know exactly what's going on. Intentional ignorance, that I can tolerate. I have no idea how a floating-point adder works, but I know how to make one given enough time and research. C, same thing -- I can just chase through syscalls, objdumps, and a book I have sitting on my desk until I find what I'm looking for. Python? I have no clue WTF is going on. It's magic, and I just get so hung up on pulling the curtain away from the wizard that I can't focus on learning the actual thing.
@NotMarkKnopfler
@NotMarkKnopfler Жыл бұрын
Linus Torvalds might have an opinion on C being dead or not.
@tru2thastyle
@tru2thastyle Жыл бұрын
C lets you define your own abstractions. When I write C extensions for Ruby, I feel like I'm programming in Ruby(in-part). Why is that? Because C allows for that. Simplicity is good.
@r1ch350
@r1ch350 Жыл бұрын
That’s true in my operating system class I made a lot of wrappers with error handling, constructors etc. and my programs were almost as readable as it was written in high level language so I believe that with some preparations C can be fun to program with but that requires some thinking about design of our programs.
@StupidusMaximusTheFirst
@StupidusMaximusTheFirst 11 ай бұрын
C++ lets you do this too. It might be easier in C++. C++ is a superset of C, it's just C but you've got more tools to your arsenal. Like a well cooked food. C is kinda raw. Sometimes it's so raw it can bite you. 😂 I like both. the freedom they give you, you can build anything with them.
@Muskar2
@Muskar2 10 ай бұрын
@@StupidusMaximusTheFirst Can you name useful features of C++? The only things I know of that doesn't shoot yourself in the foot over time are function overloading and for very specific use-cases (like unambiguous vector and matrix math) operator overloading.
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
@@Muskar2 All of them, just because your IQ is 68 and you think that everything YOU can't make use of is bad, doesn't mean that someone else didn't benefit from it. But sure: templates, this kills Cniles, they have no argument, they can screech all they want about how they can do same thing by generating C in python, but it will never be robust.
@medilies
@medilies Жыл бұрын
Hey watcher. don't get zig-pilled by him.
@JamesRouzier
@JamesRouzier Жыл бұрын
I would like something like defer and simple generics in C. Other than that I don't see anything else that needs to be added.
@CallousCoder
@CallousCoder Жыл бұрын
C is awesome! It’s small it’s simple and can literally do anything without putting in a lot of effort. As soon as Zig is mature then and only then, will C be obsolete.
@RealRatchet
@RealRatchet Жыл бұрын
C won't be obsolete while there are C and Fortran systems running. Zig has a high degree of interoperability with C but the interoperability is still a mixed bag.
@CallousCoder
@CallousCoder Жыл бұрын
@@RealRatchet I agree with that. But the vision for zig is to have complete C interoperability, I’d they’ll ever get there is to be seen. But even as of 0.12 it’s pretty impressive already. But yeah the ecosystem of C is enormous, and as long as that’s there there will also be C.
@rj7250a
@rj7250a Жыл бұрын
I know why so many languages like Zig have been created in the last 15 years to replace c. C still the oldest languages that still popular today. Cobol has been replaced by Java, Fortran and Pascal by C, all those older languages only operate in a niche today like banking or scientific computing. But C was created in 1971 and still do not give up, the cumbersome syntax and semantics shows its age, so of course C programmers want something more modern, but most "C replacements" want to avoid C's problems so much, that they forget what make C great in the first place, that is high performace and low level control over hardware, reducing adoption by current C programmers. But i think that Zig has a good chance to succed, it focus on the essence of C, keeping the best performace ever and control over hardware, only making the cumbersome stuff to be more modern.
@arma5166
@arma5166 Жыл бұрын
I'd suggest you to checkout Odin. I'd argue that it's production ready despite not reaching 1.0
@KManAbout
@KManAbout Жыл бұрын
Zig is already better than c
@JonathanTheZombie
@JonathanTheZombie Жыл бұрын
If I had to pick between C and C++ to solve a problem, I would pick C++ and write it almost like I would write C. Templates are too powerful to pass up.
@dakata2416
@dakata2416 Жыл бұрын
With great power comes great responsibility
@BrunodeSouzaLino
@BrunodeSouzaLino Жыл бұрын
so, you would write it in C++98?
@JanuszKrysztofiak
@JanuszKrysztofiak Жыл бұрын
@@BrunodeSouzaLino C++20 is cleaner than C++98.
@BrunodeSouzaLino
@BrunodeSouzaLino Жыл бұрын
@@JanuszKrysztofiak Once you start hiding all the code behind abstractions, then it becomes clean. Then you have to debug it...
@vicktorioalhakim3666
@vicktorioalhakim3666 Жыл бұрын
Any serious driver developer, embedded systems engineer and firmware engineer will laugh at the statement that C is obsolete :D There just doesn't exist a better language right now that allows one to interact so well with hardware (especially custom made hardware) than C, and probably never will. Because, that's what you want when you work in these fields: something that is as barebones, simple, and close to the hardware as possible. Perhaps the syntax can be improved, but the core fundamentals must remain the same.
@kibels894
@kibels894 Жыл бұрын
C++ is obsolete because it was made with a bunch of bad assumptions about how we would write programs in the future. Why else would it have so many new languages coming along to replace it. C will never be obsolete because it's such a simple and universally applicable set of features. It's a common interface between software systems and to the OS.
@anon1963
@anon1963 Жыл бұрын
"successors" of C++ have been around for decades, why is C++ not dead yet? riddle me this.
@tacokoneko
@tacokoneko Жыл бұрын
rust will become de facto systems language for new projects and C and C++ will become the legacy languages like fortran and cobol. i think the dominant web server kernel of the distant future like 100 years from now will be a new kernel in a rust-like language or a heavily rust filled version of Linux
@youtubeenjoyer1743
@youtubeenjoyer1743 Жыл бұрын
You can't write good software without OOP. C does not support OOP, therefore it's obsolete. Simple as
@tacokoneko
@tacokoneko Жыл бұрын
in fact i think rust will be replaced or upgraded to a language that has all the memory safety features of rust plus more, with very detailed checks run at compile time to stop every conceivable bug
@q1337
@q1337 Жыл бұрын
​@@youtubeenjoyer1743 It's not that you can't it's that it's way more efficient and less time consuming to define and later reuse 1000x than the alternative
@danidotexe_
@danidotexe_ Жыл бұрын
C will not be obsolete, until the fundamental architecture of computation we currently use is, too, obsolete.
@notuxnobux
@notuxnobux Жыл бұрын
I use C for writing core libraries. They need to be fast, work everywhere, be stable, be completely platform agnostic in behavior (no panic on memory alloc failure like rust) and be easy to use from any language (all languages can interface c) and have no magical memory cleanup as this doesn't work well when working with other languages that have different memory management models. Even with c++ if you want to give it a C interface you have to wrap all allocations in an additional new/malloc to make sure RAII isn't invoked. C is the only language that really fits these criteria.
@MI08SK
@MI08SK Жыл бұрын
What do you mean by telling: "wrap all allocation in an additional new/malloc to make sure raii isn't involved" what has raii to do with making a c interface for c++???? raii is only using a class destructor to deallocate a resource
@oserodal2702
@oserodal2702 Жыл бұрын
Then, why not Ada? Surely Ada fits these constraints pretty well no?
@katrinabryce
@katrinabryce Жыл бұрын
The "language" that non-programming experts use is Excel. My take is that C isn't obsolete, but C++ probably is.
@TheDuckPox
@TheDuckPox Жыл бұрын
even for simple logic, excel makes it unnecessarily complex to write the logic as a formula. I always end up with something like this: f(g(h(i(j(k())), l(m(n()))), o())
@jethalalrox1175
@jethalalrox1175 Жыл бұрын
well most modern kernels are written in c++, hft systems and low latency systems heavily deploy c++ so how is c++ obsolete. C++ is literally c with classes. they coexist and anywhere there is c c++ will be there. Most of adobe softwares are written in c++. You are delusional if you think c++ is obsolete. far from it. Also i don't get why hate any programming language each language has its own specific use case and usage.
@alfredonovoa8124
@alfredonovoa8124 Жыл бұрын
@@jethalalrox1175 Linux is written in C and it is a good way to keep object oriented enthusiasts as far as possible. Classes and inheritance are awful.
@jethalalrox1175
@jethalalrox1175 Жыл бұрын
then don't use them. Nobody is shoving that into your mouth. But saying that since according to you OOP is bad so c++ is obsolete or bad is just bs. C++ is an extension of c not a competition. @@alfredonovoa8124
@jonskislo1
@jonskislo1 3 ай бұрын
@@alfredonovoa8124eh they really arent. Stop sounding like the rust evengelist 😂 right tool for the job kiddo.
@RandomGuy-j8t
@RandomGuy-j8t Жыл бұрын
I did programming in college from 1993 - 96 and the other programming courses were laughing at us because they were learning C++ and we were being taught C and Cobol LOL (oh and a tiny bit of VB) - C and Cobol were considered dying languages even back then. Sadly I never landed a job programming, so I missed out on the massive cash cow that was the banking demand for Cobol programmers when year 2000 bug frenzy was high....sheessshh. I still get kinda sad that I never stayed with programming. I liked it a lot. Fun Fact: As a computer tech, in the early 2000's I did get to rewrite a piece of custom software which allowed users to design wood windows and doors and send the materials specs to a machine that machined all the wooden lengths so they could be assembled. I was pretty happy sitting in a little office all day long turning something that didn't work very well, into a really neat software program. (my mad-professor-type boss had half-written it - if functioned OK but had lots of bugs and issues - he dropped me off at the client site one Monday morning and told me - fix the software I wrote...and then he drove off - yeah Lots more stories like that LOL)
@ZTYUu0Z
@ZTYUu0Z 3 ай бұрын
funny stuff
@skeleton_craftGaming
@skeleton_craftGaming Жыл бұрын
6:48 there's some syntax differences, for instance some c compilers treat the auto keyword differently than C++.
@DylanMatthewTurner
@DylanMatthewTurner Жыл бұрын
Personally, I only have a couple "problems" with C, and most are just related to syntax. C is a simple language, and I think there are a handful of use cases where it doesn't stay simple, but it should 1. Anything with ADTs (i.e. combining structs and unions like Rust enums or Haskell types). Can do it in C and has use cases for things like say dependency injection. But man is it ugly in C. It wouldn't be hard to clean up, but it's just not quite there for me 2. No generic types. I don't even care about other kinds of generics, but just like I want templates for types. There's a lot of macro overhead that has to be done, unless you want to use void * which then there's a lot of room for error or a ton of error checking code, so again, it gets really messy and muddles up the code when generics are a fundamentally simple concept and would feel at home in C. There's no reason the compiler couldn't find the concrete types for you 3. L + Header Files Suck + No modules. Compiler should be able to find the relevant function signatures for you and encapsulation of some sort is good. 4. void *. C is a mostly explicit language. Except void *. You just do what you want with it and hack stuff together into ugly complicated worm balls. It's powerful, sure, and its functionality should exist in C, I just wish that there was simple and explicit functionality for doing those behaviors, instead of hacking them together. And having listed the other things I'd want like having modules, generics, and simpler ADTs - that stuff would actually remove the need for void * imo and provide cleaner, simpler avenues for a lot of behavior. Those four issues are what are leading me to develop my own C like language as other C-likes like Go and Zig change way more and don't necessarily address the issues I have.
@Asto508
@Asto508 Жыл бұрын
You basically list all the reasons why people started to take C and created languages from it by fixing most of the issues you have pointed out. C++ actually takes the most conservative approach by extending C and remove almost nothing from it in consequence. Many other C-like languages cut down way harder on the possible ugliness that C allows.
@Takyodor2
@Takyodor2 Жыл бұрын
Those who say you only need data-types, functions and loops don't know what they are talking about you only need data-types and functions, recursion gang let's goo!!
@homeopathicfossil-fuels4789
@homeopathicfossil-fuels4789 Жыл бұрын
Thank you for not giving me an aneurysm! Though, what do we do if the return type is too dummy thicc for the stack? Loops does save a bit, just a tiny bit! Now goto start!
@Takyodor2
@Takyodor2 Жыл бұрын
@@homeopathicfossil-fuels4789 Forgive me father, for I have looped
@nexovec
@nexovec Жыл бұрын
he picked exactly the worst possible example for when you want abstractions.
@sporefergieboy10
@sporefergieboy10 Жыл бұрын
Damn that homeless guy has a funny haircut
@Mel-mu8ox
@Mel-mu8ox Жыл бұрын
I'm learning C rn XD
@tsbrownie
@tsbrownie Жыл бұрын
I'm not sure that the language is obsolete, but the compilers are. How were memory leaks ever a thing? And I love the fact that the compiler will throw errors when IT knows what caused the error, but it's not going to tell you in any readily understandable way. The ongoing "freedom to screw up in the name of 'efficiency'" is plain and simple job insurance for programmers.
@KonradGM
@KonradGM Жыл бұрын
I think we need to accept that what is popular in technology doesn't necceceary come from what is the best. JS got made in like a week, and is not main technology of the web (and we all know what the bad side of it is). When C++ startet getting used (gonna talk from gaemdev side here) a lot of people were used to C, so they would write C in c++ leading to spaghetti terrible code, that would turn off new people from c++. Meanwhile it had nothing to do with the langauge itself but how people used it. I think you'll find a lot of people who started in C or any functional langauge don't like OOP. I think some of it comes form the fact that people either can't understand it, or were unfortunate enough to be in terrible oop codebase, where only thing releated to oop was using every single thing that the language was supposed to offer you. Technology is chosen by popularity and time it is released in, hardly ever related to how good it really is.
@rtclark4068
@rtclark4068 25 күн бұрын
Saying C is obsolete is like saying algebra is out of date in a Calculus class.
@CR3271
@CR3271 Жыл бұрын
I use a c++ compiler, but I stay closer to C in the code actually write. C++ has a few good features, but it really lost its way when it decided to act more like end user software and come out with huge set of updates every two years.
@marcolartategui4832
@marcolartategui4832 Жыл бұрын
I'm a C newbie but I want to create games with SDL2 and I don't if I could use C syntax and C++ OOP with a C++ compiler
@ritchielrez1680
@ritchielrez1680 Жыл бұрын
@@marcolartategui4832 You can very much, Casey Muratori and many other Game Programmers like to write C-Style C++, only using a subset of C++ features. Rest is just pure C.
@SystemSigma_
@SystemSigma_ Жыл бұрын
This is the way to go. You improve a language by creating better tools and improve std libraries, not by adding every 2 years whole new syntax until it becomes a different language. The worst part is that C++ enthusiasts will harass other devs with "you must use this feature" to feel smart..
@isodoubIet
@isodoubIet Жыл бұрын
@@SystemSigma_I feel like you couldn't name a single new feature that you think is bad.
@alanmcdade2459
@alanmcdade2459 5 ай бұрын
Sorry, the hair is so distracting I can’t take him seriously. Bjarne get a hair cut.
@esra_erimez
@esra_erimez Жыл бұрын
C++ is a terrible language. When you need *generics* to fix your pointers, you have a broken language.
@ninjaasmoke
@ninjaasmoke 8 ай бұрын
i wanna see Bjarne do done leet code. i’m just curious to see how well he crushes hard
@SystemSigma_
@SystemSigma_ Жыл бұрын
Freedom (C) is good, too much freedom (C++) is chaos.
@mgord9518
@mgord9518 Жыл бұрын
I think the best thing for programming languages is to have inconvenient freedom. Like having the ability to arbitrarily interpret memory however you want, at the cost of it being explicit and ugly. If your program has a bug because of improper casting, it should be obvious where that bug came from.
@rusi6219
@rusi6219 6 ай бұрын
"There is no right answer and you have many solutions for any given problem" - every single lazy C++ dev lacking the willpower to do his job right
@tophy9865
@tophy9865 Жыл бұрын
Both C/C++ are terrible. Functional languages are what need to be used.
@Sayan_Shankhari
@Sayan_Shankhari Жыл бұрын
C is and will forever remain great
@oraqlle
@oraqlle Жыл бұрын
Some (near) incompatible differences between C and C++ A few keywords (eg. `restrict` in C but not C++), linkage rules (eg. name mangling in C++, although this has many solutions), rules with pointers (eg. cannot have `char*` for string in C++, must be `const char*`, casting from `void*` restrictions), variable length arrays in C but not C++, rules about value semantics are slightly different from memory but they are more nuanced and I can’t remember if C got some of the definition in later standards.
@ristekostadinov2820
@ristekostadinov2820 Жыл бұрын
5:20 dude you remind me a lot with these stories when i was like 8-9 years old kid my dad used to tell me and my mom, "don't you ever pick up the phone or call anyone after 9PM" he was downloading some stuff from the internet lmao. I remember taking like 90minutes to download 50MB app. I was 12 when we got ADSL internet in 2008.
@Runeite51
@Runeite51 Жыл бұрын
good ol DSL with that blazing fast 700Kb down 😂
@ristekostadinov2820
@ristekostadinov2820 Жыл бұрын
and it was super expensive at least where i live you use to pay it by internet usage, now you're either pre paying 100s of GB or is unlimited@@Runeite51
@Tony-dp1rl
@Tony-dp1rl Жыл бұрын
C++ set software development back about 15 years. It was a terrible language. And I made a living writing it daily for over a decade. C was amazing, because it was fit-for-purpose. C++ was not.
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
I wonder why you made a living writing it daily for over a decade if it was so bad.
@jedisct1
@jedisct1 Жыл бұрын
C is alive and strong, but has many rough edges, that can't be fixed with incremental improvements. This is why Zig is eventually going to replace it.
@andresdominguez5738
@andresdominguez5738 Жыл бұрын
I was quite upset to hear him speak and see his expressions. I don't think he's straightup lying, but he is hiding several things that I'm sure he's aware of, to paint the scenario he wants to sell. I mean Bjarn of course.
@fulconandroadcone9488
@fulconandroadcone9488 Жыл бұрын
C is obsolete if you know assembly.
@CallousCoder
@CallousCoder Жыл бұрын
I know assembly and code it to this day, but my God was I happy when I saw C in college.
@MI08SK
@MI08SK Жыл бұрын
You need to be great in assembly if you want to outperform c. You need to know simd instruction sets(avx and sse), you need to know how to avoid conditional jumps by using conditional moves ,etc.
@martiananomaly
@martiananomaly Жыл бұрын
Assembly is obsolete if you know how to write machine code
@MI08SK
@MI08SK Жыл бұрын
@@martiananomaly that's not true assembly is just a readable form of machine code. Basicaly an assembly instruction translates to a binary instruction code along with it's operands
@CallousCoder
@CallousCoder Жыл бұрын
@@martiananomaly there’s no difference between assembly an machine code imo. At sometime in the 80s I pretty much could read 6502 machine code just like mnemonics as I had coded in a monitor so I always saw the machine code as soon as I pressed enter. A9 LDA # 🤓
@dadudeme
@dadudeme 5 ай бұрын
What the dude do cried in the first 5 minutes of the video. Bringing programming closer to scientists is literally what fortran is for.
@yancgc5098
@yancgc5098 Жыл бұрын
C and Assembly will always be the GOATS of programming languages
@yldrmcs
@yldrmcs Жыл бұрын
of course these are the languages that what pros use :)
@OdyseeEnjoyer
@OdyseeEnjoyer 8 ай бұрын
I worked as the C guy with a professional C++ programmer for a physics project. We needed a kinda big struct of about 30 bytes, the C++ version of said struct was 26K.
@sharos404
@sharos404 Жыл бұрын
I'm doing a MSc in physics doing HPC and parallel programming. I slightly cringe whenever I consider using C++ for my master thesis. I'll rather do cache-friendly heavy lifting stuff in C, and do analysis in different dynamic lang, like Python. I do, however really enjoy the application side of C++. Been using Qt for the last year, and it 'feels' really nice on C++.
@hansisbrucker813
@hansisbrucker813 Жыл бұрын
Did you consider using Fortran (it's certainly not dead) or Julia for this? 🤔
@sharos404
@sharos404 Жыл бұрын
@@hansisbrucker813 I have been using Julia a ton, but I have heard rumors that GC is a pain on clusters. I'm gonna do some tests with fully static Julia methods (as they activate no GC). Fortran is on the table, but I'm not certain about spending time diving into yet another language alongside writing my thesis.
@johnnycochicken
@johnnycochicken Жыл бұрын
Bruh when I first got this notification I thought it was literally about the letter C 💀
@darukutsu
@darukutsu Жыл бұрын
C is good, if it would have package manager like rust centralized in 1 site, would be even better.
@tordjarv3802
@tordjarv3802 Жыл бұрын
Don't get me wrong, Bjarne is without a doubt an intelligent and brilliant person whos contribution to computer science have had a huge impact and I do think it is worth listening to the things he is saying. However, in this particular case I think he is making a strawman fallacy about abstractions in C, or rather the lack there of, especially in the case of matrices. You can define a struct to represent the matrix and then make a set of functions that the user can use to interact with that matrix, which gives more or less the same level of abstraction as a class in C++. Only that C++ gives some syntactical sugar that C is lacking. In my experience that syntactical sugar can be good for making it easier to write correct code but it can also hide performance critical operations and make the user believe that their program is more efficient than it is (C++ may implicitly call an expensive copy constructor when you think you are passing a reference to some large data structure, btw this can be a problem in Rust too).
@radadadadee
@radadadadee Жыл бұрын
You say "without a doubt" and yet I here doubt it.
@tordjarv3802
@tordjarv3802 Жыл бұрын
@@radadadadee I don't doubt the things I said I don't doubt. That doesn't mean I have to agree with him on everything.
@captainfordo1
@captainfordo1 Жыл бұрын
I don’t care what the broader programming culture thinks of C. I will continue using it for my projects.
@starc0w
@starc0w Жыл бұрын
The keyword restrict is not part of C++. Simplicity is key. "C" is simplicity.
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
The simplicity of reinventing the wheel...
@starc0w
@starc0w 9 ай бұрын
@@shinobuoshino5066 I'm sorry that you don't understand one of the most important premises of technology.
@shinobuoshino5066
@shinobuoshino5066 8 ай бұрын
@@starc0w there's nothing simple in reinventing the wheel
@starc0w
@starc0w 8 ай бұрын
@@shinobuoshino5066 Nobody is trying to reinvent the wheel here. We use it and are grateful for this achievement. The only one talking about reinventing it is you. That shows that you haven't understood crucial things and are drawing the wrong conclusions.
@shauntritton9541
@shauntritton9541 Жыл бұрын
C is the best, if you find yourself in the unfortunate situation of having a gun at your head and being forced to write C++ just ignore the ++ bit and everything will be sweet. Same applies to TypeScript.
@realdragon
@realdragon 4 ай бұрын
The keyword restrict is in C but not in C++
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
i worked with C for years and i actually realized that if you embrace functional programming a bit and follow misra, you can write very clean code in C. i would love to have compile time instead of preprocessor, it would also solve templates/generics way better than c++ meta programming bs. coroutines would be useful too instead of always chosing threading for concurrency. defer keyword and gcc style closures (with scoped lifetime) would be great additions too. finally tuples, s.t. error and value can coexist in the return.
@Vivraan
@Vivraan Жыл бұрын
Why are templates in C++ bad?
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
did you ever work with them?
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
already the concept that you now start coding in a header file and ship your library as header only...
@anon1963
@anon1963 Жыл бұрын
@@Vivraan they aren't if you use them correctly, some people (including OP) can't.
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
i dont say you cant use them, i also do when writing c++. my point is that compile time is the better solution.
@xc13z829
@xc13z829 Жыл бұрын
C++ is obsolete. Sorry Bjarne.
@raindev_
@raindev_ Жыл бұрын
Abstractions is the number one reason the code becomes more complex, less understandable and less maintainable.
@Manutres
@Manutres Жыл бұрын
Wrong abstractions
@shinobuoshino5066
@shinobuoshino5066 9 ай бұрын
Yes functions are bloat, time to write everything in assembly, it's so simple lol
@ZTYUu0Z
@ZTYUu0Z 3 ай бұрын
time for binary, if you are the god of coding
@Andrumen01
@Andrumen01 11 ай бұрын
It's sad, I have been using Python for the last 1.5 years. Missing C and C++, lucky people who have the opportunity to work d-2-d with those beautiful compiled languages...not that monstrosity that Python is. 😅
@awesomedavid2012
@awesomedavid2012 Жыл бұрын
All I need for C is like package management, namespaces, optional semicolons, and some generic type stuff.
@SystemSigma_
@SystemSigma_ Жыл бұрын
God bless you
@callmesun.7126
@callmesun.7126 Жыл бұрын
Sound like Go without GC
@JulianAndresGuarinReyes
@JulianAndresGuarinReyes Жыл бұрын
I assume there's a gazillion of tests done for Silicon fabrics which are written in C. Who's rewriting those in Zig? Bun? Rust? who?…. calm down and answer my question: WHO!?
@jaysistar2711
@jaysistar2711 Жыл бұрын
The difference between learning C and Rust is that C trusts you, and Rust doesn't. C will let you accedentally write over your other data, and Rust will make it to where you must say expliciltly that writing over your other data is something that you want to do. Being that humans, and even AI, make mistakes, I believe Rust to be a good thing.
@Anriuko
@Anriuko 8 ай бұрын
I love that relationship based on mutual respect with C. Pointer arithmetic on void*, compiler nags but they're only warnings -> ignore. Yes, I know int* isn't int but it kinda is, and if we're being completely serious, who actually needs their types checked anyway? What am I, five? Types are like comments to me. Allocated a few bytes too little memory? Noted, I'll fix that later, it works almost every time because the array never actually becomes full. Not a problem. I'm an independent adult and a citizen of Earth. Let's go.
@matyasmarkkovacs8336
@matyasmarkkovacs8336 Жыл бұрын
Is Assembly obsolete? Of course not, it's very useful to know. If you understand assembly, you understand how processors work. Same thing with C. It's a nicer, easier, more human readable, flexible assembler. :)
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
array initialization is incompatible to c++. c++ initialization is bs. named struct field assignment in c++ only works when fields are given in order, why?
@Vivraan
@Vivraan Жыл бұрын
Which standard?
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
cant tell you without googling myself. but c initialization is int data[5] = {0}; c++ is int data[5] = {};
@notuxnobux
@notuxnobux Жыл бұрын
Thats true, when working with data C is better.
@aziemelzapratama5257
@aziemelzapratama5257 Жыл бұрын
​@@martinzihlmann822what does the 0 mean? Is that the value of the array?
@martinzihlmann822
@martinzihlmann822 Жыл бұрын
{0} is magic for zero initialize (doesnt work with other values in the standard, gcc has you covered though). {} in c++ means default initialization, what it does is up to implementation.
@mensaswede4028
@mensaswede4028 4 ай бұрын
The simpler the language, the better. Once you consider that every line of code you write, eventually has to be maintained by someone else. In the real world (TM), you don’t want to write code that requires everyone who comes after you to be an expert in a large & complex language.
@Luclecool123
@Luclecool123 Жыл бұрын
C as a language is definitely not obsolete but its tooling surely is.
@peter9477
@peter9477 Жыл бұрын
Tolling?
@Kabodanki
@Kabodanki Жыл бұрын
C was needed, C++ was a mistake
@jeremycoleman3282
@jeremycoleman3282 Жыл бұрын
His logic makes no sense. You dont want to have both physicists and comp sci guy work on the same problem so you have comp sci guy create abstractions for physicist guy. How is that not them working on the same problem??
@dmitriyobidin6049
@dmitriyobidin6049 Жыл бұрын
If V lang will substitute go at some point - i would be against that :) It really looks like the Golang that we really needed from the begining
Why I Use C | Prime Reacts
13:00
ThePrimeTime
Рет қаралды 159 М.
I Spent 18 Months Using Rust And Regret It
38:36
ThePrimeTime
Рет қаралды 374 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 31 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 71 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 34 МЛН
why do header files even exist?
10:53
Low Level
Рет қаралды 409 М.
Code Review: C
10:14
TheVimeagen
Рет қаралды 50 М.
C Programming Language | Brian Kernighan and Lex Fridman
6:18
Lex Fridman
Рет қаралды 170 М.
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН
C Is Not A Language Anymore
34:29
ThePrimeTime
Рет қаралды 228 М.
Linus Torvalds on why desktop Linux sucks
11:07
gentooman
Рет қаралды 1,4 МЛН
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 290 М.
Rust is Not C
16:24
ThePrimeTime
Рет қаралды 195 М.
Is Computer Science still worth it?
20:08
NeetCodeIO
Рет қаралды 350 М.
Why C is so Influential - Computerphile
10:50
Computerphile
Рет қаралды 1,9 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 31 МЛН