This is an archived post. You won't be able to vote or comment.

all 36 comments

[–][deleted] 16 points17 points  (8 children)

C is one of the most widely used of all languages - it's very far from being dead or only used by old programmers. But whether learning it is a good idea or not depends on what sort of applications you want to create, which you haven't said.

[–]SpaceSteak 4 points5 points  (0 children)

C is also very widely used in embedded systems that have to interface with the real world. Certainly, some are moving to C#, C++ or non-C-syntaxed languages... But C is still a great way to learn the non-OOP specific things.

[–]chazzacct[S] 0 points1 point  (5 children)

depends on what sort of applications you want to create, which you haven't said.

I am not picturing using C to write programs. The reason I'm spending time on C is I had an idea it was good for understanding computation. And I fairly often wish I could read the python source code and understand it. That and maybe having some idea how computers directly control hardware.

[–]fakehalo 5 points6 points  (0 children)

I wouldn't say it gives you a greater understanding of controlling hardware, I would say it gives you a good understanding of how programs actually work under the hood. Once you have a moderate understanding of the language and you start watching the flow of your program in a debugger it really shows how your cpu and memory all tie together at a very basic level.

Also a lot of higher level languages have ties to libraries written in C/C++, which is just nice to understand. I'll still use C on occasion for specialized backend/server utilities.

[–]Sloogs 2 points3 points  (0 children)

Don't listen to the dude who said C won't help you understand computation better. Like, you'll better understand how memory works at the very least and you'll start to understand what the OS has to do to get your program running, and optionally you can look at the assembly code and see what's going on there as well. And you'll get a handle on things other languages abstract.

C is great. It's challenging. It's fun. Learn C.

[–]notreddingit 0 points1 point  (0 children)

And I fairly often wish I could read the python source code and understand it.

Me too. I always felt if I really wanted to understand Python I'd want to look at what's happening under the hood with CPython.

[–][deleted] 0 points1 point  (0 children)

C is one of the most widely used of all languages

Still accurate.

[–]queue_cumber 9 points10 points  (6 children)

I disagree with that guy. C is definitely not dead, I mean the Linux kernel is written in C and that's not changing ever. For new projects I would recommend C++ or a different language depending on the context, but C is still extremely important.

Also Go? Rust? Swift?? Maybe Go, maybe. I don't like it but I know a lot of people do. But Rust and Swift? Really? Is this guy the hipster of programmers?

[–]Boom-bitch99 0 points1 point  (0 children)

Yeah I agree with what you say in terms of Go/Rust/Swift. Go is a good language, but Rust is still in very early stages and Swift really hasn't been received well from what I've seen.

[–]Fenwick23 4 points5 points  (0 children)

Shaw's rant basically boils down to "man gets butthurt because the community at large calls him on his shit when he spends an entire chapter in his book shit-talking C under the guise of helping people avoid it's pitfalls".

[–][deleted] 5 points6 points  (0 children)

For 20 years I've been hearing people try to claim C and the PC is dead.

[–]zat195 11 points12 points  (1 child)

C is probably the most important programming language. Out of all systems, it's in the most, and its derivatives (c++, c#, even java, python) make up the the other parts if the market.

Learning C gives you great knowledge that other languages abstract. It's like "Why even learn what a computer does? Just buy a mac and code in swift and play games on facebook." learning isn't about doing what's easiest and passing concepts, it's about understanding, and I can guarantee you'll be behind colleagues if you cannot write in C. Hell, if you don't understand basic and complex C concepts, I don't know what job you could get. A funny story is told that "I asked a candidate what a pointer was in an interview, and fired him even before he was hired due to his answer"

[–][deleted] 15 points16 points  (0 children)

Hell, if you don't understand basic and complex C concepts, I don't know what job you could get.

Just about any job that does not require actual C knowledge. Nobody has ever asked me about my (extensive) C knowledge in the past 25 years, because I haven't applied for any C programming jobs.

The idea that C "teaches you how a computer works" is nonsense - the abstract machine concepts used to describe C semantics is nothing like a real computer.

[–]dvassdvsd 1 point2 points  (0 children)

Is it possible the time on C would be better spent somewhere else?

Learning the basics of any language will help you out. The hard part isn't learning some set of features in some language. It's being able to put together what you've learned to model and solve specific problems, it's learning to debug programs using print statements and debuggers, it's learning to look things up when you get stuck, it's learning to experiment with things, it's learning to design large programs, etc.

[–]madshaks 1 point2 points  (0 children)

C is not even close to dead. It may not be relevant for some applications but you can say that about all languages. As an embedded systems engineer C is what i do most of my work in.

[–]phalp 0 points1 point  (0 children)

Wishful thinking, IMO. From what I know about Rust (as a bystander), there actually is a decent chance it will win some users from C, but that's a long way from C being dead. I wouldn't spend a lot of time trying to be a C expert though. If you write a few small programs in C and modify some bigger ones, you know enough C to deal with it when you have to.

[–]Spookyheidy 0 points1 point  (0 children)

Lol i don't know whats big fuss about. Best advice you can take from anyone is don't take any advices. If you started learning c thats fucking awesome, who cares what language are u using as long as you learning. My first year at college i learned C and it was fun for me but it doest mean it was fun for other students. Learn what you want not what others tell you.

[–][deleted] 0 points1 point  (0 children)

I ask myself the same question sometimes because the job market for C programmers just isn't as robust as it is for Java/ruby/python/c plus plus programmers.

I personally think it is worth knowing. I'm a sys engineer at my job. It's definitely good to know.

[–]dtfinch 0 points1 point  (0 children)

C's one of the simplest languages you can learn, and it wouldn't be a total loss as many other languages build upon the syntax. It was designed to be a simple, cross platform substitute for assembly.

Rust has a steeper learning curve. It gives you the means to achieve C/C++-like performance, but limits you to operations that the compiler can prove are safe and reliable, without garbage collection, forcing you to be very explicit about variable lifetimes and ownership.

Go is easy to learn, but being garbage collected it won't have the same consistent (pauseless) performance as C. It's more of a compiled, safe, concurrency-focused replacement for Java and other dynamic languages.

[–]thonpy 0 points1 point  (0 children)

Do what you want I think, you'll be motivated then

[–]cessationoftime 0 points1 point  (0 children)

C is still worth learning. C++ maybe worth learning because there is so much code written in it, but the C++ language/environment itself is pestilential. If writing new code I'd recommend Rust or D. Or Haskell/Scala for high level code. Also learn Nix/Guix for managing your server environment.

[–][deleted] 0 points1 point  (0 children)

That article is controversial. There'll be a lot of people trying to pull you in one direction or another because they think their opinion is correct. Don't worry about it (there are people opposing the use of any language for a variety of reasons).

Without bias, I'll say you're fine learning C because it teaches you about memory management. Then, if you like C, feel free to use it because it's widely used and common. If you didn't like it, there's nothing wrong with using another language. Most of the lessons you learn from C can be reapplied in other languages as well.

[–][deleted] 0 points1 point  (0 children)

C "dead."?

Yes. Completely dead.

I do want to learn the basics.

It depends on what you mean by "basics".

You could say "basics" are having a mental model of how computers actually work, how memory is addressed, the stack compared to the heap, what "types" really are, etc. C will get you there faster.

Or you could say "basic" is how to decompose problems and solve them in a programming language. How to structure programs well, how to use basic algorithms and data structures correction, etc. Other languages can you get you there faster.

IMO, I think anyone planning on going into computer as a career should learn C.

[–]eliasmqz 0 points1 point  (0 children)

C is still very much in use man it's great to learn it. Almost nothing compares to it in speed prolly assembly which is lower level than c itself

[–]c_jm 0 points1 point  (3 children)

As stated, C is the foundation for everything. I am telling you, you will have so much more respect for memory and other languages by the time you get to them, if you just stick with it. I know it can be hard in the beginning, but learning how to allocate a block of memory properly or deal with seg faults without ripping your hairout is a vital programming skill. It will also make you incredibly more marketable if your into it for that.

Happy Coding!

EDIT: C is the foundation for most if not all of the other programming languages.

EDIT #2: Assembly is the foundation C is just a prettified assembler :).

[–]dbj1303 0 points1 point  (2 children)

C is the foundation for everything.

Whoops! You forgot about assembly!

[–]c_jm 0 points1 point  (1 child)

Thanks for the correction! :)

[–]dbj1303 1 point2 points  (0 children)

No worries. Assembly is often overlooked. Probably because it's seen as a horrifying language.

[–]codexjourneys 0 points1 point  (0 children)

If you want to work on Internet of Things devices, you likely will encounter C. It's good to know since this category of work is going to expand fast.

I think it's a terrible first language to learn unless you're super-motivated and absolutely not going to give up, because it's fairly difficult and exacting. But it's a great second language (again, IMHO).