Is C still worth learning?

Is C still worth learning?

yes, especially for systems and embedded programming

ignore all the brainlets here who tell you to use a meme language like Rust, use C because it's small and simple, also all performance critical code must be memory unsafe

Unless you’re a brainlet

no, learn java

My university of Bangal-- umm Boston teaches it

C is the only language actually worth learning. All the others are just languages you have to know for a job. That's it.

yup, learning C is a step towards Java/C++ probably more useful languages, but also PHP/Python are pretty similar I think, but scripting languages so you don't have to worry about memory (there's garbage collection[?] in java[c++?] too)

Simple? It's the hardest of all

no, don't bother. those of us that have to actually use this language don't want to deal with your shit.

Then you're a brainlet. A language like Python is much more complicated since it has more abstractions and functions in the standard libraries. C might be difficult to understand at first glance but it gets easy the more you learn about it.

It's worth learning if you plan on doing something that is better suited to C that a language you already know.

This. C isn't a monstrosity with retarded abstractions. Its more comfy writing to the bytes of a file or device handle with C for example than using a million java Print writers and readers etc.

If you're indian and want 800$ salary

(You)

But then programmers end up implementing all those abstractions using shitty C code hacks thats prone to bugs.

This is why C++ is the best language.

yes, but don't dwell on it and then definitely don't go to C++ which is total crap

C is really easy to do wrong. I think you need to be smarter for C than for language like Java which enforce things like exception handling or garbage collection for you

why? Isn't it the defacto standard in the gaming industry?

it's very complicated and has some questionable design decisions, largely due to legacy shit

It's telling that it still hasn't been replaced yet, though.

when did we care about the gaming industry here

whatever brings in the food

also, candy crush is a pretty cool game if you ask me

>a language is harder if it has larger libraries

And people wander why I hate java/c#/python fags. They always say the dumbest shit imaginable.

The hardest language is C++. C is simpler but you have to know actual CS to use it well. Same for low level C++. The rest of the languages are simply unnecessary, most of them ( pretty much all really ) add nothing new/of importance and are slow as fuck.

It's the number one industry for systems/desktop application devs to find work in, and C++ is the most widely used language in the field.

Give me an example of a project in C that can be done by a single person without much effort in a short amount of time that hasn't already been done before.

No, of course not!

give me an example of the same thing in any other language without saying that it being done in that language makes it unique.

c is nice.
i came up with an interesting ghetto method of implementing "generics", basically you write everything you want to be generic in a .c file, but define all of the functions using a type or two that isn't defined, and then #define/typedef it before including.
i don't know if you can retypedef, but it should work as many times as you want with #define, and it isn't that complicated. plus, you don't have any real overhead with an optimizing compiler, and you only need to include the types you'll use.

C is THE language for brainlets; its the only language where you can read a 50 page book from 1970 and then you get to pretend to be an elite programmer on Sup Forums

people like to pretend because of retarded features like pointers and the garbage fire that is char arrays that its somehow super elite lol

>retarded features like pointers
lmao

C pointers are a low level mechanism that should not be the concern of programmers. Pointers mean the programmer must manipulate low level address mechanisms, and be concerned with lvalue and rvalue semantics, which are machine oriented and not problem oriented as you would expect of a high level language. A compiler can easily handle such issues without loss of generality or efficiency. Memory models of different environments often affect the definition of pointers. Memory model details such as near and far pointers should be transparent to the programmer.

The programmer must also be concerned with correct dereferencing of pointers to access referenced entities. Use of pointers to emulate by reference function parameters are an example. The programmer has to worry about the correct use of &s and *s. (See the section on function parameters.) Pointer arithmetic is error prone.

Pointers can be incremented past the end of the entities they reference, with subsequent updates possibly corrupting other entities, which is a major source of the undetected inconsistencies, which result in obscure failures, discussed in the section on correctness. In the STL library, iterators are provided as the generalisation of C pointers for access to elements of structures such as arrays.

Programmers can by-pass encapsulation with pointers; C undermines OOP by providing a mechanism where state outside an object's boundaries can be changed. Since pointers are intrinsic to writing software in C this exacerbates the problem. Pointers as implemented in C make the introduction of advanced concepts like garbage collection and con currency difficult.

>Complaining about a low level language haviing low level mechanisms

>also all performance critical code must be memory unsafe

retard spotted

Is this Sup Forums? I thought everyone on Sup Forums was a shitposter.

C has a low amount of abstractions, and thus is easier to learn, but maybe harder to understand for people who are just learning. It's nicer to know what's happening in the background. If you don't know your processor ISA and you have no idea how your computer works then you are not a computer programmer and you should not call yourself one. You are a pathetic brainlet.

Give me an example of a project that hasn't already been done before.
If you're gonna use fallacies, you're gonna have a bad time.

The creators of C would tell you to learn golang.

>If you don't know your processor ISA and you have no idea how your computer works then you are not a computer programmer and you should not call yourself one.

I agree and I was making the same point. Maybe try some reading comprehension next time.

>tfw learning C as first language

feels good man

due to their good sense of humor.

Of course it is still one of the most important languages and even if you will never use C itself everything you learn will be directly applicable to C++ or any of the other C-likes.

That is also the reason why it is thought in the first year of my university. It is a small language and no second of learning it is wasted, as it will be applicable to something else.

you'll be so glad you did, I did when I was 15. It made learning every other language a breeze and lots of fun

Is water still wet?

>It's the hardest of all
Are you retardet? C++ is nearly a superset of C and MUCH more complicated.

C is a very compact language, but unlike Python the basics are a lot harder but there is also less depth.

>C undermines OOP
C doesn't give a flying fuck about your """""""""""""OOP""""""""""""".
This desu.

thanks user

Good lad.
You'll understand underlying concepts (i.e., memory) so much better this way.

>C doesn't give a flying fuck about your """""""""""""OOP""""""""""""".
exactly; its a garbled mess that doesn't follow any sort of coherent design

C is cleanly and purposefully designed. You're thinking of C++.

C is not cleanly or purposefully designed

>its a garbled mess
No, that's C++, Java, Rust, Python, etc...
C is an extremely simple language, it provides you with the basic facilities to do what you want, how you want, the rest is up to you.

lol

>c undermines oop
because muh getters/setters (which are in any and all class-based oop languages) are NTO!1!! stateful whatsoever.
>pointer arithmetic is error prone
if you have a room-temperature iq, yeah.
>pointers can be incremented past what they reference
..which is because it allows optimizations that are not feasible to assume compilers can do, as well as allowing low-level programming which is unwieldly even with 500 layers of abstraction, such as in rust.
restricted pointers exist too, but i'm sure you care more about "muh safety" than optimization potential.
>the programmer has to worry about correct usage of &s and *s
if you have ever misused these in regular c, you are fucking moron.
these are the simplest unary operator in existence, the only case of any vague complication is with the ampersand (references) in c++, where they broke the promise that functions only take copies and overcomplicated everything in the name of the "kill all pointers" mentality.
>pointers make ... concurrency difficult
concurrency, no, unless you can provide a real example that isn't an extreme edge case caused by poor design.
parallelism, yes, but only if you don't actually understand parallelism and just use your standard library's highly abstracted primitives. (in which case, frankly, you don't need parallelism)

not even touching "pointers make garbage collection hard", i'm sure that you have some autistic reasoning as to why that makes sense.

this
oop-tier argument, friend.

C is a disservice to intelligent programmers. It has almost 0 features that a modern and intelligent programmer uses to be productive. Since C is such a timesink, it's popularity is falling more than any other languages in the market.
C is dying and it should die ASAP. C programmers are actually retards in general. C is a small language to grasp, exactly the kind of shit that makes things retard friendly.
C has no advanced features like C++ does.

But as a newfag you are kinda in the right direction. C is for newbies. Think of it this way:
During ancient times, counting to 10 was a big deal and a person who could count to 10 was considered to be "wise".

Fast forward a few century counting to 10 is so trivial we teach this to toddlers. Now toddlers appreciate the vast "knowledge" of counting to 10 while matured brains are busy with modern technologies.

C is from stone age and the people who still preach it is like overgrown toddlers that can't learn advanced things. C is for lesser programmers.
C doesn't have delegates
C doesn't have resizable arrays
C doesn't have strings
C doesn't have string concatenation
C doesn't have namespaces
C doesn't have exception handling
C doesn't have closures in the standard
C doesn't have unit tests
C doesn't have Function overloading
C doesn't have memory safety of any kind
C doesn't prevent memory exploits and has no bounds and runtime checks
C doesn't support dynamic method loading/creating
C doesn't even have generics and templates
C doesn't have meta programming
C doesn't have mixins
C doesn't have higher order functions
C doesn't have contract programming
C doesn't have inner classes
C doesn't have function literals
C doesn't have array slicing
C has a very limited support for implicit parallelism
C doesn't even have string switches

C is a cancer that plagues the modern software industry

>if you have a room-temperature iq, yeah.

CERT has proven and documented for decades that C programmers have room-temperature IQs.

>if you have a room-temperature iq, yeah.
and here we see the pathology of C 'programmers'

>(See the section on function parameters)
>doesn't post anything on function parameters

Pasting a criticism without ever having used C then I take it?

I program microcontrollers in C for my job

OOP is for those who arent really sure about their orientation

C also doesn't rely on a runtime.

> I use x to do my job y
/thread

>C doesn't have delegates
It does have function pointers.
>C doesn't have resizable arrays
realloc
>C doesn't have Function overloading
There's a macro for that IIRC.
>C doesn't have array slicing
Literally just offset your pointer.

This, use C++ instead.

>C is a cancer that plagues the modern software industry
I too love black magic that just works, until it doesn't.

Well, I don't. That's why I use a language that relies on unhygenic text substitution macros and goto statements.

Then why do you need to copy/paste arguments against C instead of being able to provide great, concrete examples where the language has burned you, or give us some stories about say, not having some reasonable, additional functionality that would be really awesome to have has wasted a ton of your time? Certainly a person who uses C all day, every day has specific gripes about C that most people wouldn't think of when most of the people on Sup Forums are amateurs, or might not use C in the same way you do? Personally, I'd love to hear stories about the shitty parts of using C at work.

>intelligent programmers require an abstraction to manage their array size and pointer for them
lmao

C is an abstraction for assembly.
Intelligent programmers require abstractions to be productive.

>all this bullshit is necessary to program
you might as well find a language that just interprets english and compiles it, you inept retard.
>b-but muh advanced features
they built UNIX on fucking C.

my time is more valuable than that, i didnt finish reading your long butthurt comment either btw

Unix is garbage and was a regression from the LISP machines that existed at the time. It only came to dominate because of antitrust rulings against ma bell.

Also you're responding to pasta, you knob.

see, here's the problem, you've tried to compare an abstraction that is entirely cosmetic with an abstraction that allows optimization, portability, standardization, and everything that entails. (i'm sure that if i said "usability" you'd ignore that assembly languages aren't even made to be written by humans any more)
your idea of "intelligent programmers" is deeply flawed in that it assumes that intelligent people require things such as array slicing (because that IS what we are talking about) which are barely even of any abstractive worth (i can emulate them without steps, which are basically an entirely different thing anyways, in 2 short lines) to be "productive" (whatever that fucking means), when in reality, the pointer being a generalization of arrays allows much more utility that built in types with operations such as slicing can ever match while being far simpler and bound by fewer, more coherent rules.

>unix was a regression from lisp machines
t. someone who has never touched a lisp machine or a pdp running unix

> garbage collection in c++
Not by default, C++ has RAII which is deterministic and much more powerful.
Microsoft has C++/CLI which is managed.

Look, mom! I posted it again!

Is an indian person with glasses smarter than one without glasses? It really depends on what you're asking it to do.

>sitting on Sup Forums
>considers time valuable

Wow. I can't even imagine the mental gymnastics going on here.

> generics with no runtime overhead
Never heard of C++ templates?

While C might not be that relevant anymore nowadays, it's still important to learn it to gain an understanding about assembly language and how your cpu processes your programs as C is very close to machine code. You'll understand why things like why the stack, heap and pointers exist, and how modern languages are built on these principles. Even if you will never use C, you will know that programming isn't just abstract stuff that your compiler "magically" understands.
Also if you want to write exploits then learning C is essential as it's the language of the computer.

What's a good book to learn C for someone with no experience in programming?
K&R is for people with some programming experience.

This, C is the only language that will never vanish as it is the language of the computer, it's high-level assembly. It doesn't add any redundant features or abstractions and that's why it can never become obsolete (unless the architecture of a computer radically changes of course).

>K&R is for people with some programming experience.
What does K&R lack, regarding complete beginners?

No, unless you want to become a brainlet.

The irony of this post can't be described by human readable letters.

It is a bit outdated and too abstract

Yes and always will be.
There is a lot of single-core systems, even for multi-core it's superior.

It's not as tight a fit as it used to be though. SIMD and CISC came along, and optimizations got more and more aggressive.

It's hard to predict what anything compiles down to these days.

Learning and understanding, yes.
Actually using, maybe, but not very likely.
It's probably best to:
> learn C well enough that you understand the mentality of careful resource management and the fundamental tradeoffs between abstractions and runtime costs
> use C++(>=)11 and intelligently pick the parts that suit your needs on any given project
> keep an eye out for aspiring C++ successors to become halfway viable

C doesn't have multithreading support.

if you do not understand C, you will not truly understand anything more abstract than C essentially

>C doesn't have multithreading support.
And it's still faster than languages that does, really makes your grey, matter.

you're retarded. go learn the language then come back and say that faggot.

#include

Understanding the C language is cake.
Getting comfortable with every flavor of ad-hoc macro soup on nontrivial projects is another matter.

The reason C++ gained so much traction is that if you need to use idioms more advanced than bare function calls, you're gonna be more productive in a framework that standardized some of them.

It's a 3rd party library not part of the language's standard though.

this guy knows what he's talking about

>C doesn't have multithreading support.
Maybe not natively, but guess what, C gives you the power to implement said functionality, see Which just goes to show, C is simple, spartan, wherever meme phrase you want to use, but it lets you do what you want to do, without relying on black magic, such as "it just works".

It depends with what you mean by "truly understand". I mean my friend knows Java and Python which are both more abstract than C but he doesn't know how these languages work behind the scenes.

This is very solid advice, but if you decide to learn C you might as well learn a bit of assembly too. Just to understand how the lowest abstraction looks like and why C is so well designed.

What's the best way to just dick around and see what the compiler emits for certain C/C++ snippets? I'm a novice but it leaves me curious.

Why reinvent the wheel?

I wouldnt mess with C++, the compiling process is very convoluted.
With C you could compile with gcc and then look at the assembly with gdb or objdump.
Also you can inline assembly in C with the __asm__ compiler hint.