Is C still worth learning?
Is C still worth learning?
Other urls found in this thread:
stackoverflow.com
twitter.com
yes
no?
No
Yes, because at some point it pays knowing how to connect different languages using the working ABI subset pays, even if none of them is actually C.
Yes.
You'll need to know it anyway if you want to be a good C++ programmer.
I honestly think you should use C++ instead. You can think of it as a superset of C.
o, this is most certainly not standard English grammar. The intention of the question mark at the end of what is clearly a statement is to express the notion that the portion of the statement following the conjunction is unexpected. However, this should be (and is) conveyed by the use of a contravening conjunction (but, however, etc).
Thus, it is not only incorrect but completely unnecessary to conclude statements like the ones in your example with a question mark.
You can learn C from C++, but not the opposite.
C is useful in rare cases.
Yes it is
char* strcpy(char* a, char* p){
while(*a==*p)
;
}
forgot to return
why do you create endless loop, nigger
oh wait, you do nothing
Tsk tsk tsk
amateurs
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 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 have dynamic method loading/creatin
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 want guaranteed memory exploits and security vulnerabilities in your program with timesink development period then use Assembly, not C.
Then... Should everyone just skip C and learn C++?
I have a very basic understanding of how programming works, and I started with Java and Python but didn't continue on then because of the much vidya development meme, and I want to know if learning C++ is even worth it nowadays.
This is literally spam and you should be banned.
If you don't know C, then your C++ is going to be garbage.
Why must I get through the (according to the walltext just above) eternal suffering of learning C just to "git gud" at C++?
System programming and embedded is still mostly under C. It's small, fee weeks should be enough to lrarn the syntax, for safe code you can find info on the net.
Because C++ is mostly an extension of C. You'll know how C++ specific features should be used and why they exist.
How do I generate random numbers to pass as input instance to sorting algorithms i wrote?
srand(time(NULL));
rand();
I would have to wait 1 second to generate 1 numbers. It would take me 1000 secs to generate 1000 numbers. Not effective
>c++ extension to c
these fucking nonprogrammers and their silly ideas of C or sepples.
you don't need to return
not really
waste of time desu
it's so simple, you'd think the faggots who were saying that it was supa hard would be right, but they're just brainlets
Fuck you swift fag
You actually need it if you want to write kernels or embedded code, outside of that, you're kind of shooting yourself in the foot.
at least half of your arguments are invalid
learn c
srand(time(NULL));
for (int i = 0; i < 1000; i++)
rand();
Ok, i'll bite.
Have you ever met someone doing advanced adulthood shit, who couldn't count to 10 ?
I assume no, because real men learn to count to 10 in order to do more advanced shit.
I have never in my life met anyone who would be considered a good engineer who didn't have a basic grasp of C, period.
Afterwards, do whatever the fuck you want, write shit in Swift or Rust, but fuck right of when you're calling yourself an engineer or programmer when you can't properly handle your C strings.
I think the basics (till you understand arrays, stack, heap, pointers and casting) are still worth knowing, and it should not take you more than a weekend. Because that's how everything works underneaths it all. But then leave it at that and learn an OOP-capable language.
Yes. Although old, it is still effectively the Lingua Franca of programming languages. Learn it, and you will find that you have gotten better at other programming languages too.
For large-scale development, it's not very good. You can't trust other people to not write shit code, and you will find that you waste a lot of time working on stuff that is automated by other languages, like memory management.
C really shines in smaller scale development, where maximum efficiency and control over system resources is paramount. Control over memory combined with a very clear translation to machine instructions gives the language value in systems/software that is mission-critical, embedded, or otherwise requiring maximum speed/efficiency, e.g. NASA flight computers or cryptographic protocols.
There are better languages for graphical or more end-user oriented software than C. However, I recommend learning it.
You are retard. Aren't you?
>S-Shut it down goyim
Kys idiot
I've been fucking around on a couple code challenge/competition sites. Know what I've learned looking at other people's solutions?
* Scala is so slow as to be worthless.
* Python is often slow but occasionally surprises you. (But that's generally when a challenge maps well to Python functions which are actually linked C libraries.)
* Java is slow as fuck. It's always slow as fuck.
* Java guys are proud of their solutions, even though they are slow as fuck.
* As much as I hate Poosoft, C#/VB.NET are pretty decent languages in terms of performance.
* C++ guys like to brag and beat up on everyone else. They often think they are the fastest.
* Almost no one uses C.
* The C solution is consistently the fastest. It beats C++ (those guys rely on their objects when they shouldn't). It smacks the shit out of C#/VB. And it curb stomps Java and Python.
>hurr durr c doesn't have muh high level crutch that i can't program without
Fuck off Pajeet. C is for engineers.
This
Only kids feel smug about squaring a 6 digit number manually
shut up?
Python is for engineers, you undergrad drop out NEET
>sum primes below 2 million
>Python: 2.5s
>C: 0.004s
>"Python is for engineers"
No, Python is for lazy fucks.
I'll say that Python is OK for one-off, R&D type stuff. You just need an answer to some statistics question and you don't want to write 20 lines of C++ when 5 lines of Python will get the answer.
But any use of Python in production software is equivalent to shitting yourself, then running around with your shitty underwear on your head.
>sum primes below 2 million
sieve of eratosthenes, nothing special. How new are you?
import std.conv;
import std.stdio;
import std.range;
void main(string[] args)
{
immutable max = (1 < args.length)
? args[1].to!size_t
: 0x4000;
size_t count = 1; // we have 2.
// flags[i] = isPrime(2 * i + 3)
auto flags = new bool[(max - 1) / 2];
flags[] = true;
foreach (i; 0..flags.length)
{
if (!flags[i])
continue;
auto prime = i + i + 3;
foreach (k; iota(i + prime, flags.length, prime))
flags[k] = false;
count++;
}
writefln("%d primes", count);
}
Assembly would do it in less time, what's your point. Also if your algorithm is shit I'm afraid relying on C's compilation to native code won't help
Yeah
Yes if you plan to write firmware to embedded systems.
No if anything else.
90% of this post is wrong,
This is literally a spam copypasta
Does C have exception handling? I'm talking about actual try blocks and assertions.
Y/N
The point was that it takes forever in Python compared to C.
Reading comprehension. Learn it. Love it. Live it you retard.
>Assembly would do it in less time, what's your point.
Not necessarily. Sometimes tight code in C will compile to the best assembly you're going to get. Sometimes you can hand optimize it. Sometimes the compiler can optimize in ways a human normally will not/cannot.
It all depends.
Just fuck off, newfag. Yes, python sieve would be slower because it's an interpreted language. But it makes up for 10x productivity
Basically you are saying you suck at ASM
Yes. It's also perfect as first language.
>Also if your algorithm is shit I'm afraid relying on C's compilation to native code won't help
But if you know what you're doing you have options when designing your algorithm that you may not have in higher level languages.
>c++
No one good implementation even.
Fuck off, t*rkroach namefag scum
>gets called out on reading comprehension
>gets pissed off
No, you're the newfag, and you can just fuck your mother.
* Python is not 10x more productive.
* It can be more productive which is why I said it's fine for one-off shit and prototyping. But it's one of the worst choices for any production code.
...
>says the guy who knows nothing about asm
>exception handling
You can do anything in c.
But you shouldn't do this in C. Write programs correctly.
>Python is not 10x more productive.
Right, python is 20x more productive than 'c'
>You can do anything in c.
You can't do function overloading in C. Is that correct? y/N
perl is better as a starter language
LMAO
N
C is better.
how so then
Good. Moving on.
Does C have meta programming? y/N
No.
You are surprisingly honest.
Does C have generics?
y/N
Since you've been nice you can give me an explanation if your answer is N
>[citation needed]
Takes 20 times less boiler plate code and malloc autism
look how easy c is lmao
>Have you ever met someone doing advanced adulthood shit, who couldn't count to 10 ?
No, because as toddlers they have gone through that phase see >I have never in my life met anyone who would be considered a good engineer who didn't have a basic grasp of C, period.
Then you don't know any real Engineers
> C strings.
Oxymoron
C is the sanest compromise when you want complete control, but don't want to write ones and zeros.
It's for actual engineers...
>[not a citation[]
go on
>>I have never in my life met anyone who would be considered a good engineer who didn't have a basic grasp of C, period.
>Then you don't know any real Engineers
I'm guessing he does and you do not.
>> C strings.
>Oxymoron
>c is the fastest way to manipulate data in memory
>all high level languages have string functions written in c
>"hurr durr c strings are an oxymoron"
Shut up.
>all high level languages have string functions written in c
Sorry what?
He's clearly retarded.
>What Sup Forums posters think its advanced stuff
Do you even embedded ?
What about embedded?
>iskra
cool
Good luck finding a job with that meme language
Are you an embedded systems engineer?
>C doesn't have string concatenation
>C doesn't have memory safety of any kind
>C doesn't have strings
>C doesn't have resizable arrays
same thing for C++
you talk about newbies but you are confusing language and standard library
>C doesn't have unit tests
bullshit
>C doesn't have exception handling
exceptions are slow and gay
C doesn't prevent memory exploits and has no bounds and runtime checks
>C doesn't have memory safety of any kind
not made for newbs
>C doesn't have Function overloading
wow what a huge handicap I have to add a suffix wow
>C doesn't have namespaces
wow what a huge handicap I have to add a prefix wow
>C doesn't have dynamic method loading/creatin
it does
C doesn't even have generics and templates
C doesn't have meta programming
gay
>C doesn't have mixins
>C doesn't have higher order functions
>C doesn't have contract programming
so gay I don't know what it is
>C doesn't even have string switches
that feeling that you are too retarded to hash your own string... :(
No, what about you?
>exceptions are slow and gay
>lol newb who needs safety
>meta programming iz gay xD
>si gay my little brain doesn't even know what they are :D
You have to be 18 to be posting here
Programming in shit like Java or C# is for newbs, everything is already done you just call some methods and thats it
Bet Sup Forums who doesnt know how to code cant solve this problem if they do I'll send .2 btc to their wallet
>Sorry what?
You should be sorry. What the fuck do you think developers use to create your ?
Parts might be written in some other high level language, or in the very language being created after it's bootstrapped. But just like with OSes and embedded, usually the performance critical shit will be in C++ or C. String and math functions are typically in C, or depend on a C foundation library.
What...you thought those fancy Python functions where written in Python? Or better yet...were just magically part of the cpu?
>"I don't know how OSes, languages, and compilers are built."
>the post
Show me where Rust's string is written in C. I'll wait
So this is the power of a C tard
If you want guaranteed memory exploits and security vulnerabilities in your program with timesink development period then use Assembly, not C.
qeq
Not even Rust. Even Haskell's runtime implementation is in a subset of the language itself. This idiot seriously thinks every language ever made is written in C.
it's only as worth it as you want it to be
personally some day i'd like to learn how to do lower level stuff with it
>C doesn't have delegates
Function pointers
>C doesn't have resizable arrays
Wrote a macro for this 5 years ago
>C doesn't have strings
Bstring
>C doesn't have string concatenation
See Bstring
>C doesn't have namespaces
Got me there...Use preprocessor
>C doesn't have exception handling
Handle failcases better
>C doesn't have unit tests
Languages with built in unit tests are??
>C doesn't have Function overloading
Literally frowned upon anyway
>C doesn't have memory safety of any kind
Don't address random segments of memory
Jeez user how do you think other languages came up with this shit.
>Languages with built in unit tests are??
D
(OP)
At my uni were required to learn it in our second year after Java. It pretty much sets us up for C++ and then data structures and algorithms. After that you can learn any language.
Yea because D is amazing. I have never seen a more attractive language in my whole life. Maybe someone with some experience could tell me why noone uses it though because it beats the hell out of me .
Shitty GC, pale libraries, doesn't have a getch() equivalent etc
If you want to you can troll Dfags for not having getch()
t. D fag
it's c++++ in a world where either they hate C++, or already use C++
Damn that sucks, D is like the exact direction I would want... new C++ standards have shaped up though so I can't complain