Is the C programming language still worth learning?

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • Patreon ➤ / jacobsorber
    Courses ➤ jacobsorber.th...
    Website ➤ www.jacobsorbe...
    ---
    Is the C programming language still worth learning? C is old (well by program language standards), and people often ask if it's worth learning, or if it's on its way out. This video talks about some of C's strengths and weaknesses.
    Related Videos:
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    www.jacobsorbe...
    people.cs.clem...
    persist.cs.clem...
    To Support the Channel:
    like, subscribe, spread the word
    contribute via Patreon --- [ / jacobsorber ]
    Source code is also available to Patreon supporters. --- [jsorber-youtub...]

Комментарии • 673

  • @sergeychistov8162
    @sergeychistov8162 Год назад +433

    As a python programmer, learning C have changed my mind and how I look at the code I'm making. So yes, It's worth it!

    • @unperrier5998
      @unperrier5998 Год назад +9

      can you please expand/elaborate?

    • @mirzakadic9174
      @mirzakadic9174 Год назад +15

      Same here, Learned JS first, now learning C++

    • @paulklasmann1218
      @paulklasmann1218 Год назад +18

      Any of the fast python libraries and functions that require speed are compiled from C++.

    • @IBelieveInCode
      @IBelieveInCode Год назад

      @@unperrier5998 If you are really interested in it, learn computer science. This can not be taught buy YT comments, lol. If you are not, do not ask.

    • @nonconsensualopinion
      @nonconsensualopinion Год назад

      @@unperrier5998 I learned assembly, C, C++, and all the way up to more modern languages in Python. I feel that knowing about registers, a bit of hardware, and the need to allocate and free memory (on stack or heap) really helps me understand what Python is doing for me. I think that helps to write code in Python which is more optimal for a CPU, giving greater performance. I've always felt that Python was something you "earned". It lets you do things which are not really great in practice but if you understand that you are doing it you have a bit of an excuse.

  • @tempura8390
    @tempura8390 Год назад +165

    Having 2 semesters of pure C, learning how the memory works, implementing Data Structures and complex algorithms, helped me A LOT to understand programming in general, it's way easier to go to another language once you have done everything in C

    • @DevlogBill
      @DevlogBill 7 месяцев назад

      Just a side note. I played around a little with C, about 2 months on my own. What I noticed C has a unique still when referencing int and strings. Recently I starting learning Golang and Go feels so much like C. Compared to other languages like JavaScript, Kotlin, Dart. Go in my personal opinion has the most similarities to C. If you are a C fan boy and would like to try another language which has a lot of similarities to C then I highly recommend GO. Go even has pointers but some what different.

    • @StubbornExplorer
      @StubbornExplorer 2 месяца назад +1

      Can't we just start from C++?

  • @dimitrioskalfakis
    @dimitrioskalfakis Год назад +264

    the things that C 'lacks' actually make you a better programmer since they force you to think and also use the language to its full extent so as to overcome the apparent weaknesses. after 50 years we can still claim that 'if C is good for UNIX it ought to be good for everything'.

    • @nikozdev
      @nikozdev Год назад +10

      Do restrictions and limitations really make a better programmer ?
      What if I wanna have namespaces, more generic programs with templates and compile-time evaluation ?
      Something that cannot be achieved because of language limitations is frustrating.
      C-strings could be built other way but they cannot be changed anymore

    • @legacywolf443
      @legacywolf443 Год назад +29

      @@nikozdev By definition, everything possible in C++ is possible in C because C++ is written in C.
      So you can't say "things that cannot be achieved".

    • @legacywolf443
      @legacywolf443 Год назад +5

      100% agree

    • @nikozdev
      @nikozdev Год назад +2

      @@legacywolf443 I mean language features.
      Can you have destructors in C ? You can explicitly call functions, but this is not automatic destruction, so zero-cost automatic destruction cannot be achieved in C, so smart pointers are impossible.
      There are no namespaces - so I always have to manage global names.
      No templates - only macros, which is much harder to debug and harder choose the right names.
      Sure, we can write in assembly to achieve everything because that is our back-end.
      But we would not have many quality-of-life features because language compilers don't do that for us.

    • @oracleoftroy
      @oracleoftroy Год назад +9

      ​@@legacywolf443_"...because C++ is written in C."_
      Not entirely sure what you mean by this, but chances are your C compiler is written in C++ actually. The three major ones certainly are.
      C++ at the very beginning started out as a transpiler to C, but that hasn't been the case for decades. C++ as a language mostly compiles valid C, though it isn't a perfect superset. Maybe one of those is what you meant.
      It's true that you can do anything in C, though at some point I think the simplistic nature of C hurts it. Personally I think if C added destructors and completely replaced the unsafe bits of the standard library with something much harder to shoot yourself in the foot with, it would be a lot nicer to work with while still being it's overly minimalistic self.
      Personally, I'd like stronger types, namespaces and templates/generics too.

  • @bonehelm
    @bonehelm Год назад +315

    I think C's age is a plus! It basically proves it's a great language. if it wasn't good it wouldn't have stuck around for so long.

    • @stefanalecu9532
      @stefanalecu9532 Год назад +10

      Well, Pascal, Fortran and Cobol are great too and yet they aren't on the same level as C (disclaimer: I use all 3, not in production but still) so I'm not sure if your argument is 100% airtight

    • @bonehelm
      @bonehelm Год назад

      @@stefanalecu9532 what I mean by "stuck around" is that C is still in top 10 most used language according to GitHub. While Pascal, Fortran, and Cobol are nowhere near that in terms of current usage.
      So C is very old and still in the top 10 most popular, therefore it's a good language. Whereas Fortran is very old, but not in the top 10 most popular, therefore it's not a good language.

    • @compilemylife3192
      @compilemylife3192 Год назад +3

      Well said 👏🏼👏🏼

    • @rajaroychowdhury6246
      @rajaroychowdhury6246 Год назад

      ​@@stefanalecu9532please don't compare between the real programming language and a scripting language. Anyway I am sure you are involved with user space application software production but not with kernel space system calls, device driver software development. C is the mother of all programming languages as OS, Compilers, loaders etc and last but the least interpreters are written in C language.
      Regards and blessings.

    • @anon_y_mousse
      @anon_y_mousse Год назад +13

      @@stefanalecu9532 Except that not as many new projects are started in any of those three languages compared to C.

  • @tir0__
    @tir0__ Год назад +341

    Real engineering happens in companies where whole stack is based around C/C++ and low level languages

    • @apostolisparga
      @apostolisparga Год назад +34

      Define real engineering...

    • @student99bg
      @student99bg Год назад +17

      Wrong. The Us Defense uses Ada. Universities used Pascal for many years.

    • @gloverelaxis
      @gloverelaxis Год назад

      no, real engineering happens in publicly-owned organisations where there is no stack and people are developing new languages to replace pieces of shit like C/C++

    • @charafedd1374
      @charafedd1374 Год назад +14

      @@student99bg the 2nd part kulled me 😂😂😂

    • @christopherlucas1475
      @christopherlucas1475 Год назад +20

      I know someone who is a young software engineer who was just hired as a COBOL programmer. He never used and didn't know what it was before. His new company is teaching it to him.

  • @Vixikats
    @Vixikats Год назад +58

    Learning C was the best thing I've ever done for my C++ programming. I get all of the benefits of a very fast workflow by being able to leveage C++'s standard library of features while being able to utilize the nitty gritty of C when I really need it. Learning C has pushed me into writing better C++ code because I'm now understanding what those abstracted C++ functions are doing under the hood and can make considerations for each.

    • @ANAND...TIWARI
      @ANAND...TIWARI 9 месяцев назад

      Bro, I have started learning c.... But don't know how can I start my career after learning it. What will be the future after it, If you could tell me regarding this I will be grateful to you 🙏

    • @Ahmad-HirzAllah
      @Ahmad-HirzAllah 3 месяца назад +1

      What is the best source to learn C language? I am new to 42 school and i will have a 1 year programming projects with C language so I need to master the language what is the best sources?

    • @happyalldaylong6212
      @happyalldaylong6212 22 дня назад

      @@Ahmad-HirzAllah how about MOOC or coursera?

  • @HansBezemer
    @HansBezemer Год назад +150

    I like C because it's predictable. I mean, there are not that many layers between C and me. I have a pretty good idea what code it pushes out and how that will work out. With languages like Python, Rust and Java I'm always wondering "Yeah, but what's *really* happening? What does this thing under the hood? How many bugs are hiding there that I don't know of?"

    • @varadinagypal
      @varadinagypal Год назад +7

      Implicit declarations -- so many people think the warnings are for losers to read ;)

    • @LucasGabriel-xz8nk
      @LucasGabriel-xz8nk Год назад +12

      This is the cost of abstraction. The same way I could say I program in x86 assembly because I need to understand what a "for" do or a "malloc" do under the hood. That being said, I also agree with you that the predictability is important and should be a feature of any low level language

    • @HansBezemer
      @HansBezemer Год назад

      @@LucasGabriel-xz8nk The best C programmers have at least a hunch of what kind of assembly is pushed out. And they have a good idea of how the C runtime functions.
      One could argue that a "for" is an abstraction in itself, of course. Or even a malloc() - and they'd probably be right. Even if one did assembly, I guess one would introduce a few fancy macros to "abstract" the boring details out of a program.
      But see the difference - one is still very involved and *KNOWS* what these abstractions boil down to. Can you tell me you *WHY* a vanilla "for-next" in Python is dozens of times slower than its C equivalent? I thought so.. Too many magical layers.
      (I made plenty of C VMs that were much, much faster than Pythons VM - so it can be done).
      But it boils down to a simple preference. To some, fast is fast enough. And they don't bother about predictability as long as it gets the job done.
      But I'm not that kind of guy. If I have to hunt down a bug, it'd better be mine - and not someone elses. But I agree wholeheartedly I'm just voicing my personal opinion and preferences here - not stating an indisputable scientific fact.

    • @gigachad8810
      @gigachad8810 11 месяцев назад +4

      I wouldn't call C predictable. Implicit conversions, UB literally everywhere, differences in implementations, etc. Also, thinking that the std library has bugs is.... outdated?
      (Rust btw has none of the issues above, and I would call it incredibly more predictable than C, would be happy if you could say why you think that it's unpredictable)

    • @LucasGabriel-xz8nk
      @LucasGabriel-xz8nk 11 месяцев назад

      ​@@gigachad8810good point

  • @josephlandry8787
    @josephlandry8787 Год назад +60

    Learning C was the best choice I’ve made. I don’t want to waste my time learning technologies that won’t be around in a few years.

    • @smallSphere69
      @smallSphere69 Год назад +30

      Learning C >>> Learning random crap JS framework which'll loose popularity in 1 week.

    • @legacywolf443
      @legacywolf443 Год назад +13

      @@smallSphere69 way too based, watch out for trendsters crying about it

    • @jasonenns5076
      @jasonenns5076 Год назад +7

      Like rust

    • @alvarohigino
      @alvarohigino Год назад +4

      Me too. And I simply like its simplicity.

    • @smallSphere69
      @smallSphere69 Год назад

      @@jasonenns5076 Rust will get rust.

  • @kevinyonan2147
    @kevinyonan2147 Год назад +38

    A bonus I want to add to this video: Because C is simple, there's usually only one way to do things, and alot of behavior isn't hidden from you, memory bugs are actually pretty easy to debug, especially when using any standard debugging tool out there. Honestly, the only bad thing about C's age is its standard library. It has alot of useful stuff you'll need but its not-so-good design is definitely showing.

    • @samuraijosh1595
      @samuraijosh1595 Год назад +7

      memory bugs are also extremely easy to make at the same time....

    • @kevinyonan9666
      @kevinyonan9666 Год назад +6

      @@samuraijosh1595 with experience you figure out ways to heavily reduce that.
      1. NULL check your pointers.
      2. Set pointers to NULL after freeing an allocated pointer.
      3. Limit how much memory allocation you're doing.
      4. Initialize any pointers to NULL if you're not immediately Initializing them to an address.

    • @captainfordo1
      @captainfordo1 Год назад

      @@samuraijosh1595I suggest you look into the arena allocator

    • @varadinagypal
      @varadinagypal Год назад +12

      "there's usually only one way to do things" -- what? Looking at production code, all I see is idiosyncratic shenanigans, the same problem gets solved differently each and every time. Can you guess how a menu is implemented? Parallel shallow arrays, not an array of a certain struct. Mix in a ton of ifdefs, and now reorder the elements.

    • @JohnCDSMB
      @JohnCDSMB Год назад

      ​@@kevinyonan9666Exactly

  • @alenmumo
    @alenmumo Год назад +14

    I'm not a C guy, however I ended up writing a thesis about web programming in C, just to realize by myself that there is not, and probably I wont ever know, any other language like this. It certainly rocks, it's certainly the winner at the poker table.

  • @oliverr4946
    @oliverr4946 Год назад +7

    The first language I learned was C on crappy linux machine. It really forces me to learn how language, compiler, linker, os, hardware, build system, and libraries work together. That learning process really help me a lot later when I was learning other language and many aspects of computer programming in general.

  • @pcuser80
    @pcuser80 Год назад +17

    C is the no.1 language for me. I do all in C even create gui programs for windows.

    • @hypnoz7871
      @hypnoz7871 Год назад +1

      God I love C for everything, but a GUI must be next level in term of difficulty.

    • @pcuser80
      @pcuser80 Год назад

      @@hypnoz7871 Its very easy, The base of win32 api is also written in C.

    • @matyasmarkkovacs8336
      @matyasmarkkovacs8336 Год назад

      ​​@@hypnoz7871It's not easy, but really not that bad. For eg. you can use gtk with C as well which is easier than winapi.

    • @anon_y_mousse
      @anon_y_mousse Год назад

      @@hypnoz7871 Depends on what library you're using. If you need cross platform, go with GTK. If you're on Windows only, the base Win32 API isn't too bad, or at least wasn't for me back when I developed with Win98. Though, I would still argue for GTK if someone even wants to consider a transition to a good OS.

    • @not_kode_kun
      @not_kode_kun 5 месяцев назад +2

      @@hypnoz7871 depends. if your program is simple, a simple GUI library like raygui works really well and isn't hard to work with at all. Very easy to modify too since its so simple, so if you know a bit of graphics programming you can add any feature you want

  • @baze3SC
    @baze3SC 4 месяца назад +3

    For systems / graphics / embedded programming it's a must. Also the syntax of many modern languages is basically a derivative of C. I recently worked with a code base that was written in pure C, not even C++. What a delight.

  • @asowers1
    @asowers1 11 месяцев назад +5

    I spoke to an engineering manager at Lockheed Martin a few weeks ago who hadn’t even heard of Rust. Expect C to be around for as long as it’s been here for government and military applications.

    • @User-bl5ce
      @User-bl5ce 6 месяцев назад

      I've heard they also use Ada a lot

  • @LogicEu
    @LogicEu Год назад +68

    Not only C is the grandfather of most modern languages, but it's also the corner stone of humanity's tech stack (Linux, Windows, MacOS, etc)

    • @edgeeffect
      @edgeeffect Год назад +2

      I'd have thought Algol-60 was the "grandfather"... C isn't THAT old.

    • @heruhday
      @heruhday Год назад

      @@edgeeffect what about fortran?

    • @edgeeffect
      @edgeeffect Год назад

      @@heruhday Algol-60 has blocks, repeat and while loops. All the things people would recognise in a "C like" language. Fortran doesn't.

    • @heruhday
      @heruhday Год назад

      @@edgeeffect fortran has repeat dan while loop..
      Example:
      INTEGER A(4,4), C, R
      ...
      C = 4
      R = 1
      DO WHILE ( C .GT. R )
      A(C,R) = 1
      C = C - 1
      END DO
      Example

    • @heruhday
      @heruhday Год назад

      @@edgeeffect
      Block example:
      PROGRAM foo
      INTEGER :: a
      add1 : BLOCK
      INTEGER :: res1
      res1 = a + 1
      BLOCK
      INTEGER :: res2
      res2 = res1 + 1
      END BLOCK
      END BLOCK add1
      END PROGRAM foo

  • @RedPotato13
    @RedPotato13 Год назад +34

    Beginner programmer here, I'd say C is a fantastic first language tbh. The fact that it doesn't have a lot of the pre-built functions in it's libraries compared to other languages really makes the learning worth it since you basically need to make them by yourself. The way that I had to comprehend how memory work really increased my understanding when coding as well as improving how I view my code. Although other languages like Python can serve as an easier and more beginner friendly, C is in a threshold that's still doable by a beginner as well as providing a solid thinking process that will help when learning other languages. Learning programming by starting with C was probably one of the best choices I've made.

    • @keto6789
      @keto6789 Год назад +2

      Learn assembly

    • @jal051
      @jal051 11 месяцев назад +3

      I don't like python for begineers because it hides how types work (and yet has types). Types are foundational to coding in any language. A learning language should use strict types, imo.

    • @cyberchef8344
      @cyberchef8344 10 месяцев назад +2

      @@jal051Hot take - all languages should use strict types. The amount of time you "save" by not having to type "int, string, etc..." is easily lost the instant you make one mistake with your types that only shows up at runtime rather than compile time. Plus the code is by far more readable on its own to other developers.

    • @jal051
      @jal051 10 месяцев назад +1

      @@cyberchef8344 Absolutely agree! I don't even think I save any time not typing the type. One still has to make the decision of what type it is that variable you're declaring, so what's the point in not being explicit with it. You don't win anything. It's a fake simplification which only introduces troubles on the long end.

    • @ANAND...TIWARI
      @ANAND...TIWARI 9 месяцев назад

      Bro, I have started learning c.... But don't know how can I start my career after learning it. What will be the future after it, If you could tell me regarding this I will be grateful to you 🙏

  • @suborno9249
    @suborno9249 Год назад +6

    C is the reason how I learn about how classes and packages works.

  • @notremarchedelafin
    @notremarchedelafin 11 месяцев назад +5

    I was a programmer from 1994 to 2002. Graduated in computer science from university of Montreal. I moved to another field of work in 2003. I was a C programmer. I still remember a lot of things, and I believe I could pick up programming again very fast. I knew (and still know. I have not forgotten) C++ as well, but not using it very much. I did many things in C that I cannot imagine how I would have done them without the "low-levelness" of C (dynamic hashing tables (dynamic matrices, 2 dimensions, double pointers). I think it was a major pain the the ass, sometimes, because OOP programing would have made the code clearer. Good ol times...

  • @loc4725
    @loc4725 Год назад +21

    From an educational perspective I find that C is a much better teacher of how a computer works behind the scenes, and I like that it forces learners to pay close attention to and understand what it is they are writing.

    • @niggacockball7995
      @niggacockball7995 Год назад

      yup going from python to C was like enlightement to me

  • @zoltannemeth8864
    @zoltannemeth8864 11 месяцев назад +2

    I wrote a whole custom server and desktop provisioning system for a company over 15 years ago in C. It’s so good, that multiple attempts to replace it (because someone in management was being told by vendor salespersons that they should an commercially available product), but every attempt has failed because the custom solution works so well.
    Because I did not rely on any libs other than what is in the core OS, it doesn’t have fragile runtimes that require constant updates and releases, etc…. Anyway, my point is that C is powerful, it is fast, it is secure (if you know what you’re doing) and it can reduce the need for “framework update driven releases”.

  • @martinhaub2602
    @martinhaub2602 Год назад +7

    C is indispensable for one simple reason: Speed. And the vast back-library of C material is incredible.

  • @savclaudiu2133
    @savclaudiu2133 Год назад +21

    In an extreme situation, with little contact to outside word I would chose C and maybe Python. C is one of the few languages in which I can program without the need for online documentation. For all the other languages I know the path most traveled, but as soon as I wander outside of it I need some way to refresh my knowledge. I added Python because it's fast (not necessary safe) to code in it but you still need proper documentation for the used libraries.

    • @Argletrough
      @Argletrough Год назад +1

      For basic stuff like what function arguments mean, Python's built in help function can be useful. E.g. help(random)

  • @normbograham
    @normbograham 11 месяцев назад +3

    Years ago, I worked for a company that "bought" old code (java and C/C++), and recompiled it, etc. I love C/C++. Love it. But old C and C++ code does not want to compile on new compilers. And to add insult to injury, there was not any work at all to converting the old java code. It all worked right out of the box. I have not used it much, but it did make you like java. The C/C++ code, when compiled on a new compiler, was sorta buggy. We spent a month compiling, and getting it to work, writing new make files, etc.

    • @normbograham
      @normbograham 11 месяцев назад +2

      Bugs that pop out from moving from one compiler to another, are failure to initialize variables, and even small details in the language, like holding a string.c_ptr too long, and reusing when it left scope. Or worse. dereferencing null ptrs, is a feature in AIX xlc. so, they do memcmp's against NULL

  • @The_Mad-Ramx
    @The_Mad-Ramx 7 месяцев назад +1

    Hi i am a up and coming C developer i just wanted to say i really appreciate this kind of content it helps me to better grasp things about my studies so ty so much!

  • @user-mr3mf8lo7y
    @user-mr3mf8lo7y Год назад +38

    Are you guys kidding? We would not have any development in our daily computing lives without C.

    • @8292-d6n
      @8292-d6n Год назад +2

      That's true but C could still get outdated. Like horses got replaced by cars, C could become similarly irrelevant. I personally love C but your point is weak

    • @RamsLiff
      @RamsLiff Год назад

      ​@@8292-d6nC stood the test of time, probably it wont be replaced at all, it has all the things you want. Although it takes time to create something, on the way you wrote your own libs and can probably be more productive

    • @matyasmarkkovacs8336
      @matyasmarkkovacs8336 Год назад +3

      ​​@@8292-d6nYeah, but what could replace C? Rust? Cmon it has a very ugly syntax. C is designed to be simple and efficient. It never wanted to be memory safe.

  • @edgarbonet1
    @edgarbonet1 11 месяцев назад +2

    Great video! I would just like to add that, in the realm of embedded Linux, if you have a C cross-compiler targeting your board, that's all you need to build a complete system: bootloader, kernel, libc, shell, editor, command-line tools, Perl and Python interpreters, etc.

  • @derektan6987
    @derektan6987 Год назад +5

    As a CS student who has been touching C for at least two years, I think that besides its familiarity (syntax and awareness of it) with lean, mean execution, there are two other reasons. For the other points, I compare C programming to philosophy. You do it for enjoyment. And the more you get into it, you gain insights into how things work or why things are the way they are. Overall, the best thing anyone going into programming can do is to keep learning.
    My heart is big enough for Python and Java too.

    • @cyberchef8344
      @cyberchef8344 10 месяцев назад

      As a former CS student currently working in industry... I don't see a place for Java, other than when required because it's already in use in a project. If you need to be fast/close to the hardware you have C, C++, and Rust. If you need fast prototyping you can use Python. If you want to be able to quickly (or even for production) throw together GUI applications you can use C#. Java's original pro was that it provided: object oriented design patterns, garbage collection, and portability. Object oriented design patterns are largely falling out of favor because they end up making the code more complex than it needs to be - not to mention it inevitably blows up into a non-maintainable mess the instant the goal of of the project changes. Garbage collection is implemented in other high level languages as well - plus you could just learn how to correctly manage memory and the whole thing becomes a non-issue. Portability... not really sure where this myth that other languages aren't portable came from. Sure the binaries don't transfer... but who cares. It's really not that hard to set up a few toolchains. For the most part you have Windows, Linux, and Mac OS -- and that's assuming you want to support all 3. I really just don't see how Java has a place.

    • @derektan6987
      @derektan6987 9 месяцев назад

      @@cyberchef8344 Ah, I forgot to check replies earlier. As my update, I agree that Java felt sluggish to use even for leisure projects. The documentation was fine, but looking at all the extra OOP patterns tossed in along with the forced use of classes made me come to a similar conclusion. Java is clunky- development-wise and syntax-wise which made me grow tired of it. At this point I would only use Java for writing Minecraft plugins.
      With that being said, what are your thoughts on Kotlin in terms of the programming experience?

  • @chrissaltmarsh6777
    @chrissaltmarsh6777 Год назад +6

    I got to C from assemblers, programming close to the metal (as a physicist). That taught me a lot. 'The C Programming Language' - K&R - was a revelation.
    Now Rust is around; That might be the follower for close to the metal. But running the rust tools on a PDP-11 would not work unless you have a lot of spare time.

    • @Burnr-hw6zs
      @Burnr-hw6zs Год назад

      Regarding "rust tools": Do you mean running the Rust compiler on a PDP-11 or the resulting binary?

    • @Burnr-hw6zs
      @Burnr-hw6zs Год назад

      Probably both but I think porting the compiler to work within the limitations of the PDP-11 would be more difficult than simply writing a PDP-11 backend.

    • @chrissaltmarsh6777
      @chrissaltmarsh6777 Год назад

      @@Burnr-hw6zs I meant the whole rust stack. A binary would work fine, at a guess, although you'd have to build a compiler; and that is a very clever and informative compiler. Squeezing that into a PDP would be a mite tricky.

    • @chrissaltmarsh6777
      @chrissaltmarsh6777 Год назад

      @@Burnr-hw6zs That is why I used raw C. Better than assembler and close to the hardware.
      Now I can cross-compile Rust (or C, for that matter) to the little machines, microproccers, that I use to hit the hardware. Which is fun. (I'm mostly retired - my PDP era was getting on for 50 years ago, but the notion that 'os C useful?' is, I think, on the money, especially if you use it to get at hardware addresses. You learn a lot of what a computer has to do, without the nuisance of learning assembler)

  • @Kotesu
    @Kotesu 11 месяцев назад +3

    This has been alluded to in the video and in the comments, but after 16 years in both software and embedded systems - the number one reason for C is “control”. As you’re writing, you can pretty much know exactly what instructions the compiler will generate and how data is accessed and moves throughout your system. I don’t know of many other popular languages where that is the case and it serves as a good and predictable intermediary between assembly and higher-level languages. (And as as aside, if you think developing in C is slow, try writing in pure assembly.)
    In most application software, you typically don’t need explicit control over both “what” and “how” the CPU works, but in certain subdomains it’s absolutely critical: high performance or tight memory requirements, finite timing (e.g. cryptography or hardware drivers), determinism (e.g. aerospace, controls, or other intrinsically-safe domain).
    So when I hear bunch of people complaining the language isn’t relevant, I hear people saying that it’s not relevant for the domains they’re familiar with

    • @gigachad8810
      @gigachad8810 11 месяцев назад +1

      I would say "control if you know every detail of the arch and os and compiler you are using/compiling for"

  • @johnpawlicki1184
    @johnpawlicki1184 Год назад +19

    Using C since K&R first edition (1978). It is the underpinnig of almost everything (including C++). If I had to pick one language for the rst of my life it would be C. But every other language brings something else to the table. All languages that find a purpise have something to offer. Python is great for teaching and casual learning. In the old says we had to pay for languages, hunderds even thousands of dollars for a compiler. Now there seem to be free versions of everything. Sometimes the old days were NT as good as today. ;-)

    • @edgeeffect
      @edgeeffect Год назад

      My advice would always be "If you have to pick ONE language for the rest of your life..." - don't! ;)

  • @victorgallet3174
    @victorgallet3174 Год назад +19

    C is highly productive when you got to the point where you wrote lots of small libs to help on some low level stuff. Features in other languages can most of the time be adding as small libs in C. But C will always be waaayyyy faster to compile than any new language.
    It's a small, simple language. That won't change a lot in the future, that's a real plus.

    • @varadinagypal
      @varadinagypal Год назад +1

      Hm... yeah. A clean build for a not-so-enormous microcontroller we use, depending on the features we compile with, takes anywhere from a few minutes to go grab a coffee, take a walk in the building, take a dump and it is still not done.

    • @xhivo97
      @xhivo97 Год назад +1

      @@varadinagypal You really wanna use single translation unit builds if you want fast compiles in C/C++ otherwise as your project grows it will get slower and slower. It's really rare that you have the freedom to do that though. Some newer languages are trying to solve the issues with compile times though, we'll have to wait and see what happens.

    • @anon_y_mousse
      @anon_y_mousse Год назад

      @@xhivo97 How is it rare having the freedom to do that? C allows you to put every function in its own file, if you want, and you can even add the prototypes for them all into one header to make using them from anywhere easy. And with tools like `ar` you can even update a library one module at a time and build super fast. Learn the tools and their proper uses and you'll be happier.

  • @SolathPrime
    @SolathPrime Год назад +20

    C is divine anything else is heresy

    • @ProfeARios
      @ProfeARios 4 месяца назад +3

      That is so true. Regards from Panama 🇵🇦

  • @jailop7013
    @jailop7013 Месяц назад

    I really appreciate your balance opinions!

  • @JorgeMartinez-xb2ks
    @JorgeMartinez-xb2ks Год назад +5

    Absolutely worth it. It was my third language I learned 35 years ago. First was Basic language, then Z80 Assembly. If you know C well, it's very easy to learn mostly all other languages. For example, getting into Go or Rust is very fast. I learned it with K&R book but nowadays I recommend the book Head First C, it'll give you a very good idea of Linux inner workings too.

  • @Soengiac0001
    @Soengiac0001 Год назад +10

    I only code in C

  • @billkendrick1
    @billkendrick1 11 месяцев назад +3

    Every time you mentioned Rust, I kept thinking "but will I be able to cross compile to 6502 with it, like I can with C?" ;)
    (I've been writing games and apps for the Atari 8-bit conputer in C... after decades of BASIC and an Algol-style language called "Action!".)

    • @argonwheatbelly637
      @argonwheatbelly637 11 месяцев назад +1

      MAC/65 did change the game after using the Assembler Editor cartridge for a long time. Took a massive, but powerful, Atari BASIC program and sped it up considerably. However, I did right a one-pager in BASIC (including more REM than not) that I find people unable to write even today in an efficient manner. It solved the "birthday problem" in about 30 seconds. "Find the number of people required to have a greater than 50% chance of two people having the same birthday. [People are born throughout the year with equal likelihood.]" Yeah, on an 8-bit machine with 4k of RAM. It's a good program for students to try in any language.

  • @milasudril
    @milasudril 11 месяцев назад +1

    To be fair, when you program in C or C++, you program what the standard calls an "abstract machine". While it is a good model of a von Neumann computer, it certainly misses some parts of a modern system, like caches, branch predictors and SIMD, though SIMD is on the way to C++. Thus, code that looks fast can be slow depending on memory layout, any potential aliasing etc. Also, on some machines, floating point operations must be emulated in software. If the result becomes a subnormal number, many processors (even on servers and desktops), need software support.

  • @BigA1
    @BigA1 Год назад +2

    Perhaps a good test for a programming language is to see how well you can work out what someone else's program is doing and how it is doing it. That said, I'm struggling to learn C as it seems to be the defacto language for embedded systems - which is what I need it for.

  • @psionl0
    @psionl0 Год назад +4

    If there is one thing I don't like about C it is that C doesn't permit nested functions. Frequently the sole purpose of helper/auxiliary functions is to provide information to a single function. These have to be coded separately with their own unique names, stack frames and copies of local variables. Grrr.
    Otherwise, I agree with everything you have said. When I do LeetCode problems, having to write my own data structure routines proves to be very educational. Not needing to include the kitchen sink for every problem means that I can reduce the code and running time of the problem.

    • @gergoo007_
      @gergoo007_ Год назад +1

      Hey, I don't know your stance on GNU C, but it does have nested functions.

    • @anon_y_mousse
      @anon_y_mousse Год назад

      I'd actually like an explanation of what your use case is before I comment further on it. I have my suspicions, but sometimes people have really niche needs.

    • @psionl0
      @psionl0 Год назад +1

      @@anon_y_mousse Why? There are heaps of examples where a function might need a recursive helper function. You can find them in Dynamic Programming, Graph traversals etc.

    • @anon_y_mousse
      @anon_y_mousse Год назад

      @@psionl0 Most of those helper functions aren't much more difficult to use or simply put above the current function. Capturing state can be annoying, but it's not impossible or super onerous, just a *little* bit more annoying.

    • @psionl0
      @psionl0 Год назад +3

      @@anon_y_mousse You CAN code auxiliary functions separately but making that mandatory as is done in C doesn't make it a good thing. There are many examples where a function makes several calls to an auxiliary function but no other function does. In those situations it may make sense to embed the auxiliary function within the function so that they can share parameters and local variables. As it is, when I create an auxiliary function, I often have to pass a long list of parameters and local variables from the function to the auxiliary function and it gets messy.

  • @dmytrk
    @dmytrk Год назад +5

    Definitely yes. While, writing in C#, i decided to make some CLI prog on C and discovered so many concepts, like actually using gdb, or thinking on how to allocate memory for different scenarios, that I can project onto my C# workflow. Also, Vim is the best editor for C/C++😅

  • @golfstix83
    @golfstix83 11 месяцев назад +1

    As a newbie, C really taught me about the mechanics of how variables are declared and work. That is from a view of what's actually happening in the hardware. Compared to something like python, which is like riding a bike with training wheels

    • @cyberchef8344
      @cyberchef8344 10 месяцев назад

      Did it? I honestly didn't really understand how variables work until I learned assembly. C hides it from you by creating the abstraction of "types". A computer doesn't understand types

  • @NonameEthereal
    @NonameEthereal Год назад +8

    As a "Rust Enthusiast": C is the best thing that ever happened to me. I came in the weird way with no formal training (I studied Journalism, then ended up building Sawmills, later ended up with Video Game QA, and am now doing Test Engineering at some rando website people use). Through that last, the TE, I have grown to like certain ideas in Rust, certain approaches, so I wanted to learn it.
    But it's hard. It's got a lot of stuff that can be difficult to pick up. And nothing has been as good at teaching me that, as taking a step back, using C (often with the help of a certain Sorber's videos), to achieve the same thing. Eventually I figure out that there's a thing I had misunderstood about how things REALLY work under the hood, that other languages I use (Shell, JavaScript, or the Rust I was learning) was sort of hiding from me.
    After that, I can drop C (until next issue), go back to Rust, and the latter is suddenly WAY easier. Because I spent some time with C.
    Or, as we call it: "Vitamin C". :)

    • @nerdycode
      @nerdycode Год назад +1

      Would you say to someone learning Rust to first learn C? Asking for a friend 😅

  • @BrianOSheaPlus
    @BrianOSheaPlus 9 месяцев назад +1

    Hahaha, sick burn at 1:28 (the caption at the top-left). 😂 🔥 I too have a love-hate relationship with Perl.

  • @nikozdev
    @nikozdev Год назад +3

    I like c for learning but cannot endure it’s lack of generic programming that cpp has.
    Templates and concepts, constexpr, namespaces made me fully switch to cpp.
    But I am still looking for modern alternatives.

    • @IBelieveInCode
      @IBelieveInCode Год назад

      "I like c for learning but cannot endure it’s lack of generic programming"
      Generic programming in C needs programers that have strong brains.

    • @anon_y_mousse
      @anon_y_mousse Год назад +1

      C doesn't have the best syntax for generic programming, but if you read the standard and play with some example code you can still do everything with it that you can in C++, just with less sugar. For reference, look up _Generic in the C standard.

    • @nikozdev
      @nikozdev Год назад

      ​@@anon_y_mousse ,
      I've found that for the first time =D
      Thanks for this

  • @arnthorla
    @arnthorla Год назад +11

    I think Rust is more a C++ replacement. A language which I find much more appealing in the same way I find C more appealing than C++, is zig. Their objective is explicitly to make a better C. The main drawbak at this time is just lack of maturity, but it holds promise.

    • @bluesillybeard
      @bluesillybeard Год назад +1

      100% agree. Rust has way too many features and is way too hard to learn to be a C replacement.
      Zig is much better suited for that, although it still needs a few years to mature, once it has I bet it will blow up in popularity

  • @coolbrotherf127
    @coolbrotherf127 11 месяцев назад +2

    C is easy to learn because it's not very abstracted, but hard to use because it's not very abstracted. It can do a lot with it's basic tools, but knowing how to do a lot with it takes a lot of time and effort.
    Every time I sit down to use C, it does feel like building a house with popsicle sticks, slightly better than the toothpicks of assembly, but not as effective as the bricks of C++.
    It really comes down to what software tools are best for the specific project that the programmer is working on. While I think it is good for many programmers to learn a bit of C to better understand how computers work, I don't think that every programmer needs to master it in order to be a "real programmer".
    Many jobs focus on completely different languages and skills that don't require any advanced knowledge of C so it's totally viable to not worry about it too much if it's not something you'll need very often.
    Then as far as Rust (and Zig?) go, the student programmer should probably focus on C first and then learn the newer languages as C is much more established. 99% of systems jobs require C and some assembly knowledge anyway, and universities still tech it, so it's hard to avoid it if the student wants to do that kind of work. It's also pretty easy to pick up newer languages later anyway as they'll only have to learn the features that are different that C instead of all of programming all over again. The newer languages still use many of the foundational concepts in C, just with improvements with the hindsight to see what didn't work as well.

    • @argonwheatbelly637
      @argonwheatbelly637 11 месяцев назад

      Summary: Driving a manual transmission is nice, but becoming quaint, as ever more people drive automatics with so many features. That can be a good thing; however, the trade-off is usually needing to return to a dealer for proprietary componentry, even if an aftermarket place is willing to work on the vehicle. But that's not the same as programming or coding for a job. Then it's about business needs, not personal preferences.

  • @imqqmi
    @imqqmi 11 месяцев назад +2

    I think learning assembly (I learned Z80) and C gives you the low level understanding how a system works, how optimizations work and what performs best. C is usually the first high level language on any given new system as a bootstrap language.
    C is still used in many embedded systems, drivers, kernels, high performance applications etc. The number of languages that can rival c is increasing but can't still beat the maturity of tools for c yet. Imagine the carbon footprint of youtube, ai training, processing of big data using python or even C# and java. It's not only not performant, it's irresponible for our little homeworld!

  • @RAMB0VI
    @RAMB0VI Год назад +1

    Could you make a guide about programming an embedded device/board from scratch? Considering an empty project, what datasheets do you need to study to get 1. the board and 2. the devices in the board to breathe? Where do you start with the board code and while going through these steps, explaining the registers and other relevant stuff in making the board come alive.

  • @alexandermacleod7810
    @alexandermacleod7810 3 месяца назад +1

    The other nice thing about C for learning to code well is that with Python you can get away for a time with writing sloppy illegible code but C really forces you to pay attention to what you're writing, how you write it and how you structure it other wise it likely won't even run.

  • @GAMarine137
    @GAMarine137 Месяц назад

    25 yr career. Started in C, then Java, then .Net, then NodeJS and have been in Go for several years. Rust syntax for complex tasks makes me want to throw the keyboard out the window (literally). Go and Rust were both originally written in C. Picking up videos on this channel due to something you may have not thought of: ClaudeAI. It does amazing job with code generation and only getting better. This can open the door where AI takes complex business problems and cranks out low level code (C or Assembly). Therefore negating the Cons mentioned in this video.

  • @rhazeannethajoc7340
    @rhazeannethajoc7340 3 месяца назад

    Starting up with c as my first programming language in college makes learning java easier and our professor actually emphasize the important of c despite it being old. We are trained to build our logic while learning c and it really help, i think its a good start especially with someone studying IT or IS but have no background knowledge like me.

  • @dfolegna
    @dfolegna Год назад +1

    In my opinion C has 2 unique things: it is one to one mapping to the von neumann machine execution model, so you program with the control data flow in mind AND has all the basic tools for algorithmic recursion,, stacks and so on. The example you gave about code lenght does not say the other one was calling a library. if you have a great library, you do the same with C. The last thing is memory access: you can teach how to write safe c, it is totally possible if you do well from the beginning and you know what arw you doing. A simole example: you can use pointers only on specific restricted and controlled part of your code, so every memory plays is there and the algorithms are in another place.

  • @rockerdudeb
    @rockerdudeb Год назад +6

    I'd be interested in seeing you compare Rust and Zig. Both are trying to fill the General Systems Programming space, but Zig is leaner and takes a different approach from Rust as a successor to C.

    • @hypnoz7871
      @hypnoz7871 Год назад +5

      Rust is a "kitchen sink" language that is good for replacing C++.
      Rust is NOT a successor of C. It can't be. It's too complicated.
      A better successor of C is Zig and even then it is FAR from complete and the technical debt of C is likely too big to be overcome in my opinion.

    • @savclaudiu2133
      @savclaudiu2133 Год назад

      @@hypnoz7871 Can you detail what you mean by the technical debt of C?

    • @oracleoftroy
      @oracleoftroy Год назад

      ​@@hypnoz7871That's interesting as it appears to me that many Rust adopters are often C and C+ (that is, C with classes) types that weren't on board with modern good C++ practice. The C++ guys are interested in Rust, but more to borrow the good ideas and bring it into C++ rather than switching over wholesale. Consider the Linux kernel looking to add Rust support even though Linus famously has an irrational rant against the language that pioneered many of Rust's most loved features.

    • @gloverelaxis
      @gloverelaxis Год назад +2

      @@savclaudiu2133 I think they're stretching the definition of "technical debt" to mean "the existing real-life programs people currently depend on", which is really describing a very different thing to "technical debt"

  • @TDG361
    @TDG361 2 месяца назад

    C was the first programming language I ever learnt. It was difficult and a headache to learn, but I must say, it was thanks to C that I fell in love with programing and computer science/engineering in general. I don't whether I would have liked so much programing, have I learnt another programming language first. Its simplicity made me understood that I could do tons of stuff with programming, that I'm limited only by my own creativity. C is beautiful because of its simplicity, it's ugly because it can be a headache sometime (pointers), but in general, once you understand the basic idea behind C and programming, C is great!

  • @onaecO
    @onaecO Год назад +9

    Is the C programming language still worth learning? == Is a monkey programmer worth hiring?
    You really understand the machine with C, this makes you a refined Computer Scientist not only a "6 months bootcamp Lord" imho.
    For Taleb fans here, C is a lindy language, old but ALIVE. This makes it worthy! not the other way around.

  • @jonbezeau3124
    @jonbezeau3124 Год назад +7

    What I like from C is how explicit the language is. There is no name mangling, there are no function or operator overrides.
    In the final exam from last term, one student answered a question, basically "what does this code do?" with "who knows? Is += overloaded?". I feel the same looking at any language that took hints from C++
    About those language features: other languages don't have features C lacks, they have features that were probably *built in C in the first place*. As I love telling my class, serious C doesn't look like C any more. You've been rolling your own libraries for a decade so common tasks are one-liners, there's a framework for handling runtime errors, and your output code or array slicing is concise just like any high level lang... that nobody else understands. In short turn your capability issues into compatibility issues lol

    • @gigachad8810
      @gigachad8810 11 месяцев назад

      Whats so explicit about C? I'd rather stick to a real explicit language like Rust, thx

  • @arrowrod
    @arrowrod 11 месяцев назад +1

    C has got to be good. I learned C 25 years ago at community college. I started 50 years ago writing code using assembler language. C could have enhanced function libraries. Assembler used prewritten Macros. Maintaining systems written by other programmers. Invigorating.

  • @Teixas666
    @Teixas666 Год назад +5

    everyone that programs for a living should at least have a working understanding of C.
    having this point of view lets you truly understand how the memory works whihc is a skill that translates ot basically every other language evne ones that manage it for you.

  • @WillsJazzLoft
    @WillsJazzLoft 5 месяцев назад

    Fabless manufacturing and electronic design automation are two growth areas where the talents of someone skilled in C are essential. One could be picked up by companies such as Intel, Apple, NVIDIA, Google, AMD, Microsoft

  • @James-l5s7k
    @James-l5s7k Год назад +3

    Yup, still relevant.

  • @roberthuff3122
    @roberthuff3122 8 месяцев назад +1

    🎯 Key Takeaways for quick navigation:
    00:00 📅 *Introduction to C's relevance*
    - Discussing the relevance of the C programming language in modern times.
    02:26 🕰️ *Common complaints about C*
    - Addressing common complaints about C, including its age, lack of certain features, and perceived inefficiency.
    05:16 🚀 *Advantages of C*
    - Highlighting the strengths of C, such as its speed, versatility, and foundational role in computing.
    07:32 🎓 *Educational value of C*
    - Discussing the educational value of C due to its simplicity, hands-on nature, and ability to deepen understanding of computer systems.
    Made with HARPA AI

  • @camilogoyenechea757
    @camilogoyenechea757 7 месяцев назад

    I’m currently taking Harvard’s CS50 and I have to say that it’s great for understanding what’s “going under the hood” plus that when we swap to python it will be definitely much more easier.

  • @ClergetMusic
    @ClergetMusic Месяц назад

    I like C. I started with QBasic in middle school, and came back to programming more than 20 years later.

  • @kowalski2031
    @kowalski2031 Год назад +3

    I tend to avoid using C because I’m a C++ programmer and since both languages are very similar I made the choice to only use C++ to not get confused. But the drawback is that I don’t know C that much. 😅

    • @xCwieCHRISx
      @xCwieCHRISx Год назад +1

      Basically C is C++ without classes, namespaces, templates, references and overloading.

    • @vitalyl1327
      @vitalyl1327 Год назад

      There are things that C++ simply cannot do. There is no MISRA-C equivalent for C++.

    • @kowalski2031
      @kowalski2031 Год назад

      @@vitalyl1327 MISRA C++ exists

  • @tomsawyer283
    @tomsawyer283 Год назад +5

    The thing is unlike every modern language, C wasn’t made with respect to what languages features were and a specific purpose. C needed to be able to do what was fundamental to computing and what still is to this day. As such, yes, C doesn’t have every feature of other languages however all of those features can be (and have been) created with and implemented into C.
    Heck, even things like the socket implementation doesn’t matter because there’s this thing called headers and their files. It’s not a matter verbosity either. C’s easily less verbose than Java and C++ for example: I don’t want to make this too long but I’ve also, hot take, don’t think classes or OOP is even necessarily a good thing as so many over pack too much into them and use it beyond whatever they’re purpose. Generics are nice, but again they’re not impossible to implement into C and even then it’s not good practice to rely on them.
    The only thing I think is arguable is lack of garbage collection. Except you can actually make smart pointers in C and ultimately it forces you to make better code.
    However, all of this said, I don’t think that only C should be used. Rather, that it can be and that many of complaints about it aren’t worthy of ever considering it no longer viable. Like yes, if you just want to make a quick mock up or a scripting language, go ahead and use Python. But I hate, especially with the growth of AI, how much devs have ignored the huge problems with Pythons computing and numbers processing time. Sure, you could, can, and should at least implement those parts with C and/or C++ but even then it’s just using Python beyond what’s it meant to do. Infamously PHP and JavaScript as well.

  • @evancourtney7746
    @evancourtney7746 5 месяцев назад

    I learned C at a New Jersey community college, taught by an old gray-beard retired from Bell Labs; was the best math class I've ever had! These days I'm mostly using Python and Javascript, but when it's easier to just write a plugin for SQLite, I dust off my old C chops and delve into malloc() and void (*)() and all my old friends. C is portable assembly; it will teach you how computers work and that knowledge is foundational to any competent programmer.

  • @mosaed_b
    @mosaed_b Год назад +1

    Java runtime is written in C, even javac compiler is initially written in C (yet others claim it is now Java compiled in Java, still it is compiled first by C then bootstraped to Java), majority of big Python libraries that require high computations are written in C, JavaScript V8 engine is written in C and Assembly, etc.
    but for me I develop in Java, specifically using Spring Framework, because that serves my work purpose, and my self interest..

  • @rogerfroud300
    @rogerfroud300 11 месяцев назад +1

    When I see people using a Raspberry Pi, an operating system and Python to flash a couple of LEDs, I could weep. Sure, as soon as you need complex interfaces, BlueTooth etc, it's different. However, if you don't know 'C' (or assembler) how are you going to program an 8 pin Microcontroller? Unless you can get down and dirty with the hardware, you'll never grasp how these things work.
    I've written an entire CNC controller in Assembler, before 'C' compilers were efficient enough to get the necessary performance from 8MHz hardware. (Yes, I'm very old) Understanding programming at the lowest levels really helps when you move to ever higher level languages.

  • @joshgibson3618
    @joshgibson3618 Год назад +1

    Great video, thanks!
    The newest iso version is c23, I’m curious how soon will the next version come out?

  • @ultrametric9317
    @ultrametric9317 11 месяцев назад +1

    How did you make this whole 10 minute video without transmitting the key point? C is a portable assembler essentially. That is why it will never disappear. C gets a lot of the blame that should properly fall on C++. Bjarne was not a wise man.

  • @yevgeniygrechka6431
    @yevgeniygrechka6431 Год назад +4

    The last point is excellent! I think C is the best language to learn programming. After you spend a few weeks executing malloc by all means learning something else, but you'll have a great foundation in understanding how things work under the hood.

  • @metaltyphoon
    @metaltyphoon 5 месяцев назад +1

    What sucks about C and would solve 80% of the problems:
    1) Missing an Array List
    2) Missing a hash map
    3) Add defer keyword, gotos suck for cleanup code
    4) Missing a string type. Every project reinvents one
    5) Have a package manager
    You don’t even have to make threads.h non optional …

    • @PiotrPilinko
      @PiotrPilinko 4 месяца назад

      Package manager is usually a part of dev environment. But standard containers (array/list/map/hashmap/set/hashset) would be very helpful. Handling errors by goto is just crap (and C++ handles it with RAII on much cleaner way).

  • @mysund
    @mysund 4 месяца назад +2

    I always wanted to learn C in school. But C has no classes :(

    • @TheLastCrow5150
      @TheLastCrow5150 Месяц назад

      If you can, learn it yourself as much as you can. It'll suck. All of us had to put up with it.
      Once you get a chance to take the class, it will make much more sense.

  • @sanderbos4243
    @sanderbos4243 Год назад +4

    Personally I would've understood computers the quickest if I learnt C + NASM at the same time, comparing implementations on them constantly, and after that learnt Zig. The creator of Zig roughly described his language as being C, but with all the cruft removed. Hope you try it out! Rust tends to feel more complex to understand than Zig to me, with the tons of feature it has. Zig reminds me a bit of Lua in its simplicity. :)

  • @purpasmart_4831
    @purpasmart_4831 5 месяцев назад

    C has been my goto language for almost 9 years, Still my favorite, but I'm now learning golang, I think it's good language to pick up if you already know C.

  • @Burnr-hw6zs
    @Burnr-hw6zs Год назад +5

    My main concern is actually none of the three: It is memory safety.
    I think there is also a distinction to be made whether it is worth learning C vs writing C. As many important API of libraries and operating systems are C, one should definitely learn C, but since almost everything interfaces with C it is not required to write your projects in C.
    I agree that learning C is worthwhile to learn low level programming, learning how memory works, and that is so great about it.
    On not being able to articulate in which areas C is old: Null terminated strings, Header Files (I think the whole compiler/linker split is not that great but most languages use it), Poor macro system, No standard fat pointers, Unsafe APIs in the standard library (format string vulnerabilities, strncpy not null terminating, etc., ischar UB), weird global state like errno and locale.
    I think even though C has problems, they are known and you can learn to work around most of them by writing your own helpers, enabling appropriate warnings, etc..
    I think C will stay with us for a long time. There is simply no other language that has a stable ABI, allows you to handle allocation failure, does not abstract you too much from the machine (yes, this can be a good thing!), makes interfacing with hardware easy, has a lightweight runtime and stellar performance. I think C is a good starting point for systems programming, but I see Zig and Rust gaining popularity. These languages have learned from the mistakes of C, but I think it is unlikely for them to fully replace C. Besides, they have issues of their own.

    • @anon_y_mousse
      @anon_y_mousse Год назад

      Weird, because as long as I'm writing the code myself I have no concerns for memory safety. But if it's really all that concerning to you, it'll be a false assurance from any other language if you have to depend on others' code, and I doubt that you don't if you're complaining about these things with C. For instance, null terminated strings are only the de facto standard with C when using the C standard library, but need not be for your own code. And if you use strncpy wrong then that's on you considering that you know its quirks. Format string vulnerabilities are only a problem if you're not checking user input, which is a really bad idea. Also, other languages can handle allocation failure, even C++ can and that's even if you're writing idiomatic C++.

    • @Burnr-hw6zs
      @Burnr-hw6zs Год назад

      @@anon_y_mousse
      Well my problem is that C does not protect programmers. Details like pointer provenance, strict aliasing, unsigned integer wraparound (what if i want to trap?), shifting signed integers, realloc with size 0 in C23, all these things are to look out for when writing C. But these are only the things I know. So what about the things I do not know about, will my application be secure and continue to be secure? (I am being hypocritical since none of my applications I wrote are security relevant) Even a typo in a call to malloc can get you hacked. Obviously you can stick to your own guidelines and use tools, but keeping track of C's shenanigans makes the C language more complex than it could be. You see, applications like sudo and operating systems written in C have many security vulnerabilities, which are only found after years. Maybe the next operating system (components) should not be written in C. With Rust you write a secure abstraction of a system API and you do not need to worry about most of this (Though I agree with you that providing a safe abstraction is hard, so if it is not done well it'll be false assurance). With regard to your last part I was talking more about the sum of all the features, you know Swift has a stable API too, Zig also handles allocation failure, Assembly does not abstract too much from the machine and Fortran also has stellar performance. (I also meant it as a hyperbole, there are C like languages but none of them are that popular (well if you disregard C++, but C++ has more problems than C).

    • @anon_y_mousse
      @anon_y_mousse Год назад

      @@Burnr-hw6zs Okay, so you want the language to do everything for you so you don't have to think. Got it. C's quirks are not only known, but written for all to see in the standard. If you have problems with them, then you're doing something weird that's an edge case, but you're probably doing it on purpose because you can easily write conformant C that doesn't hit the weird quirks. Rust doesn't make your code secure, and the abstraction prevents you from fully understanding what your code is doing which is a really bad idea on top of making it ill-suited for systems programming. No one should have to use a stupid keyword to access necessary features to do their job. It's part of why I hate languages like C# and Rust, because they want to hold you back with an "unsafe" keyword, and why I tend to hate modern idiomatic C++ because no one uses "using" and everyone has std:: littered throughout. Of course, that said, I'd still rather use C++ than Rust because its syntax is better. And it's laughable that someone would advocate for a language like Rust and then call C complex.

  • @harpuia101
    @harpuia101 4 месяца назад

    You hit a major, underrated argument; the educational value.
    C's minimal abstraction is fantastic as a bridge between human logic and a processor. It's that happy medium..
    Yes, it is frustrating to learn.. yes, it takes more lines of code than other languages with more abstraction. Yes, the strict syntax throwing compiler errors is annoying to new programmers. Yes, it can be annoying to have to define everything.
    Yet when you actually learn how to use C, you gain a greater understanding of HOW and WHY it all works.. compare this to highly abstracted languages, which might as well be magic (unless you are the kind of person who digs deep into libraries/source files to find the lowest level of methods.. few do that).
    If you have a good understanding of low-level things, you'll have an easier time learning high-level languages.. and your ceiling grows..

  • @DevlogBill
    @DevlogBill 7 месяцев назад

    It's amazing how C gave birth to so many interesting programming languages. Some of my favorites like Kotlin, Golang, JavaScript and PHP and yes Python. My only gripe with C is what can a new programmer build with C? Seems only advanced developers are able to create compilers with this language.

  • @solaire_of_the_east
    @solaire_of_the_east 6 месяцев назад

    I started programming with python like most of the beginners do, though Python has eclectic libraries for almost everything, if someone wants to understand how a computer works under the hood, C is the lang one should look up to. After learning C, a lot of concepts that previously sounded unconvincing to me, started making sense.

  • @carlh8256
    @carlh8256 Год назад +9

    I'm an embedded software developer that uses C. Of course it's worth it.

  • @pweddy1
    @pweddy1 4 месяца назад +1

    C is a systems language. You will find it behind a lot of the tools you use everyday. Including Linux. How do you write fast Python code? You write the critical code in c.

  • @hoi-polloi1863
    @hoi-polloi1863 28 дней назад

    To be honest, I think C is vital as a pedagogical language, because it's a lot "closer to the metal" than the newer languages, but still human readable. When I was in school, they started us on Scheme for algorithms; then assembly language for pain and so we'd be *grateful* for C; then C sold as a nicer version of assembly.
    Point being, it's good to know C to make sure you really understand what your program is doing, and for the *occasional* high-performance application. But most of the time, the ease-of-use of python or C# are more important. Person-time is usually more expensive than beefier hardware.

  • @tanpham762
    @tanpham762 Месяц назад

    I started learning C in 1990 just after I had graduated from my Engineering course. 😊

  • @unperrier5998
    @unperrier5998 Год назад +3

    Love C because of the control it provides. True it's verbose, you've got to manage everything, it's unsafe and the language feature set is basic (ah ah you didn't see that coming!) but it's just powerful.

    • @hypnoz7871
      @hypnoz7871 Год назад +3

      C is NOT unsafe if you know how to manage memory.
      And static analysis become better and better every year.

    • @RamsLiff
      @RamsLiff Год назад +1

      ​@@hypnoz7871I think the most "unsafe" part is handling user string inputs, but theres lots of solutions. C is "unsafe" because those who use it dont know how to use

  • @timothykeith1367
    @timothykeith1367 5 месяцев назад

    I'd like a C--. It would be C that's better for large projects. It would have encapsulation and simple objects - but essentially minimalist C that is extensible through libraries

  • @MrDukeeeey
    @MrDukeeeey 23 дня назад

    C has a stable ABI it's a very small language which makes learning easy and you can pretty much write anything with it. But do some simple stuff with strings for example and the missing features get ridiculous fast. I could write a small lib in c or something for a micro controller but I wouldn't want to write any larger serious program in the language.

  • @chieeyeoh6204
    @chieeyeoh6204 Год назад

    Ya, the concepts of the technology is more important than the how some language/framework deal with them. It will lay a stronger foundation and allow user to have easier transition to other language/framework.

  • @jal051
    @jal051 11 месяцев назад

    I love C. It's supereasy and I feel in control. My only complaint is how painful it can be to setup a project sometimes. Linking libraries can be really annoying, specially when half of the times you need to recompile them. I hate this part of the proccess. I find my self writting things in Python just because I don't want to setup a C project, even when I feel way more comfortable with C.

  • @papasmurf9146
    @papasmurf9146 11 месяцев назад

    The coding example where only a few lines of Ruby compared to lots of lines for C highlights the value of libraries, not necessarily differences in the language. The C code is great for showing what is really happening versus just library magic. If someone wanted to, they can create a library that would make the C code as simple as the Ruby code.
    After someone has a firm grasp on C, I would argue they should learn an assembly language. Not that they'll ever program in assembly professionally, but it will help them understand what is going on under the covers much better. My team at work has a mix of developer experiences, all coding in C++. If something goes sideways, one of the guys that learned assembly is more likely to fix the problem them someone who only knows C++. Not that assembly is called for, but an understanding of what is going on under the covers is required.

  • @mback3713
    @mback3713 11 месяцев назад

    OS kernels (even modern kernels) are almost universally (arguably necessarily) written in C. C is basically tuned to work at a low level of abstraction while also being portable to multiple architectures. If an application needs to obsess about every clock cycle and every bit of memory being used by the program while at the same time needing to be portable and readable... then that application (for better or worse) is probably begging to be written in C.

    • @gigachad8810
      @gigachad8810 11 месяцев назад

      Yea I'm sure that won't change. I also don't know any OS that has been adopting another language well. I mean why would anyone want to avoid C? Theres absolutely 0 issues with it

  • @ahmadirfan7840
    @ahmadirfan7840 11 месяцев назад

    The only things that I dislike about C is the pointers.. still don’t understand to point the pointers using asterisk pointers..

  • @wlcrutch
    @wlcrutch Год назад +1

    My only complaint, where I truly regret using it, it is with string or regex operations. Strings aren’t fun in c

    • @paluz1177
      @paluz1177 Год назад

      Just write some C++ or Js strings functions and you can be happy

    • @wlcrutch
      @wlcrutch Год назад

      @@paluz1177 Exactly…but then why am I using C? The point is, if I’m not using strings, I use C. If I am, I am using C++

  • @rdubb77
    @rdubb77 Год назад

    I think it’s good if you actually need it, or as a teaching language because manual memory management is very good to learn in general, even if you never use it. Pointers are good for visualization ability.

  • @billj5645
    @billj5645 11 месяцев назад +1

    Is C worth learning? C is worth learning when you are learning to program. A lot of the development of programming includes good tools to learn how to program cleanly and simply. Everyone who wants to program should read the writings of Brian Kernighan, Dennis Ritchie, etc. This will get their mind going in the right direction.

    • @argonwheatbelly637
      @argonwheatbelly637 11 месяцев назад

      The K&R book was one of my first on C. The neat thing was I wound up working with Dennis Ritchie years later.

  • @Steven-v6l
    @Steven-v6l 5 месяцев назад

    if execution speed is important, then C is a very good choice. C forces you to think about data structures and algorithms -- which are essential to efficient program execution.

  • @happyalldaylong6212
    @happyalldaylong6212 22 дня назад

    Good video for beginners, could you tell us about the potential development space for C? Like will it still control the major market of machine language? Hope for your reply , thanks a lot~

  • @disgruntledtoons
    @disgruntledtoons 11 месяцев назад

    Yes, it's relevant. When you go into industry, there is a good chance you will code in C++, Java, JavaScript, or C#. The syntax of all four of these is based on C. A new developer who only learned C in college can be brought up to speed in minimal time in any software house that codes in these other languages.

    • @toby9999
      @toby9999 11 месяцев назад

      I've learned many different languages over the past 40 years to varying degrees of proficiency. I'm strongest in C and C++ . Recently tried learning java again after a number of false starts, the first being back in the 90s. Not going well at all. I hate it and I hate it's awful ecosystem. And don't get me onto the monstrosity commonly known as "Eclipse" %$#@&%$. Piece of crap.
      So you're probably correct in general, but some tools and/or languages can simply be a bad fit... I'll never be a productive java developer. That has again become crystal clear.

  • @michaellewis7758
    @michaellewis7758 11 месяцев назад

    You can get around type safety but to say C isn’t type safe isn’t quite correct imo. The main thing missing from C is templates; you can’t compare a library in language X with bare C implementation.
    Of course, C/C++ may be behind things in other languages - e.g Pandas.
    Where I work we have lots of C++ with Python layers.
    C and Haskell - those are two languages I think students should learn in depth. Don’t understand the appeal of Rust tbh.

  • @p3num6ra
    @p3num6ra Месяц назад

    What kind of coursework would best fit using C for it? e.g., Intro to programming? Data structures class?

  • @JavSusLar
    @JavSusLar 11 месяцев назад

    You forgot: in C you can define a variable that is a pointer to a pointer to a pointer to a pointer to a pointer to a pointer to a pointer to a pointer to a value.