[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is C still worth learning?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 215
Thread images: 17

File: c.png (7KB, 197x255px) Image search: [Google]
c.png
7KB, 197x255px
Is C still worth learning?
>>
>>59621350
no?
>>
>>59621350
No
>>
>>59621350
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.
>>
>>59621350
Yes.

You'll need to know it anyway if you want to be a good C++ programmer.
>>
>>59621350
I honestly think you should use C++ instead. You can think of it as a superset of C.
>>
>>59621378
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)
;
}
>>
>>59622070
forgot to return
>>
>>59622070
why do you create endless loop, nigger
>>
>>59622104
oh wait, you do nothing
>>
>>59622070
Tsk tsk tsk
amateurs
>>
>>59621350
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.
>>
>>59622430
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.
>>
>>59622430
This is literally spam and you should be banned.
>>
>>59622677

If you don't know C, then your C++ is going to be garbage.
>>
>>59622743
Why must I get through the (according to the walltext just above) eternal suffering of learning C just to "git gud" at C++?
>>
File: tmp_22420-1484236030123151778245.jpg (763KB, 683x1024px) Image search: [Google]
tmp_22420-1484236030123151778245.jpg
763KB, 683x1024px
>>59621350
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.
>>
>>59622789

Because C++ is mostly an extension of C. You'll know how C++ specific features should be used and why they exist.
>>
>>59621350
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
>>
>>59622881
>c++ extension to c
these fucking nonprogrammers and their silly ideas of C or sepples.
>>
>>59622085
you don't need to return
>>
>>59621350
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
>>
>>59622430
Fuck you swift fag
>>
>>59622430
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.
>>
>>59622430
at least half of your arguments are invalid
>>
>>59622887
learn c
srand(time(NULL));
for (int i = 0; i < 1000; i++)
rand();
>>
File: 1490644085080.jpg (669KB, 2048x1365px) Image search: [Google]
1490644085080.jpg
669KB, 2048x1365px
>>59622430

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.
>>
>>59621350
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.
>>
>>59623128
You are retard. Aren't you?
>>
>>59622697
>S-Shut it down goyim
Kys idiot
>>
>>59622430
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.
>>
>>59622430
This
Only kids feel smug about squaring a 6 digit number manually
>>
>>59621446
shut up?
>>
>>59624725
Python is for engineers, you undergrad drop out NEET
>>
>>59624795
>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.
>>
>>59624901
>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);
}
>>
>>59624901
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
>>
>>59621350
Yeah
>>
Yes if you plan to write firmware to embedded systems.

No if anything else.
>>
>>59622430
90% of this post is wrong,
>>
>>59623254
This is literally a spam copypasta
>>
>>59625104
Does C have exception handling? I'm talking about actual try blocks and assertions.
Y/N
>>
>>59624950
The point was that it takes forever in Python compared to C.

Reading comprehension. Learn it. Love it. Live it you retard.
>>
>>59624978
>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.
>>
>>59625137
Just fuck off, newfag. Yes, python sieve would be slower because it's an interpreted language. But it makes up for 10x productivity
>>
>>59625156
Basically you are saying you suck at ASM
>>
>>59621350
Yes. It's also perfect as first language.
>>
>>59624978
>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.
>>
>>59621410
>c++
No one good implementation even.
>>
>>59625204
>>59625219
Fuck off, t*rkroach namefag scum
>>
>>59625163
>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.
>>
>>59621350
>>59619434
>>
>>59625170
>says the guy who knows nothing about asm
>>
>>59625124
>exception handling
You can do anything in c.
But you shouldn't do this in C. Write programs correctly.
>>
>>59625242
>Python is not 10x more productive.
Right, python is 20x more productive than 'c'
>>
>>59625283
>You can do anything in c.
You can't do function overloading in C. Is that correct? y/N
>>
>>59625204
perl is better as a starter language
>>
>>59625264
LMAO
>>
>>59625307
N
>>59625321
C is better.
>>
>>59625354
how so then
>>
>>59625354
Good. Moving on.
Does C have meta programming? y/N
>>
>>59625370
No.
>>
>>59625392
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
>>
>>59625293
>[citation needed]
>>
>>59625436
Takes 20 times less boiler plate code and malloc autism
>>
>>59622070
look how easy c is lmao
>>
>>59623254
>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 >>59624736

>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...
>>
>>59625460
>[not a citation[]
>>
>>59621397
go on
>>
>>59625498
>>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.
>>
>>59625670
>all high level languages have string functions written in c
Sorry what?
>>
>>59625718
He's clearly retarded.
>>
>>59622430
>What /g/ posters think its advanced stuff
Do you even embedded ?
>>
File: 1488243967606.jpg (405KB, 900x1200px) Image search: [Google]
1488243967606.jpg
405KB, 900x1200px
>>59625827
What about embedded?
>>
>>59625845
>iskra
cool
>>
>>59625845
Good luck finding a job with that meme language
>>
>>59625956
Are you an embedded systems engineer?
>>
>>59622430
>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... :(
>>
>>59625973
No, what about you?
>>
File: 1455950055870.jpg (32KB, 300x470px) Image search: [Google]
1455950055870.jpg
32KB, 300x470px
>>59625985
>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
>>
>>59626037
Programming in shit like Java or C# is for newbs, everything is already done you just call some methods and thats it
>>
http://stackoverflow.com/questions/43076597/component-claiming-state-prop-is-undefined-eventhough-it-is-auth

Bet /g/ who doesnt know how to code cant solve this problem if they do I'll send .2 btc to their wallet
>>
>>59625718
>Sorry what?
You should be sorry. What the fuck do you think developers use to create your <insert favorite high level language here>?

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?

>>59625789
>"I don't know how OSes, languages, and compilers are built."
>the post
>>
>>59626062
Show me where Rust's string is written in C. I'll wait
>>
>>59625985
So this is the power of a C tard
>>
>>59622430
If you want guaranteed memory exploits and security vulnerabilities in your program with timesink development period then use Assembly, not C.
qeq
>>
>>59626073
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.
>>
>>59621350
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
>>
>>59622430

>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 Anon how do you think other languages came up with this shit.
>>
>>59626139
>Languages with built in unit tests are??
D
>>
>>59621350 (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.
>>
>>59626167
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 .
>>
>>59626234
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
>>
>>59626234
it's c++++ in a world where either they hate C++, or already use C++
>>
>>59626249
Damn that sucks, D is like the exact direction I would want... new C++ standards have shaped up though so I can't complain
>>
>>59626234
Its garbage collector is (still) shit and the language was torpedoed by a schism in the standard libraries for several years in its early life. Also the reference compiler is proprietary which dampened the enthusiasm of the FOSS community for it.

Also I personally don't see how it's attractive at a technical level, it has all the terrible overgrowth C++ suffers from. I remember the about page on their website just used to be a long feature checklist without comment on design philosophy or intent.
>>
>>59626273
Well
1. You can avoid GC and there are clear instructions to do so
2. You can use C++ libraries in D
3. getch()? You can use C libraries in D
>>
>>59626288
One thing I can confidently say is: D is THE most comfortable language I have ever worked with
>>
>>59621350
It is. People complaining like this about a fucking language either cannot use it properly or do not care about performance and simplicity.
>>
>>59624383
Try:
for (int i = 0; i < 1000; i++) {
srand( time(NULL) * (i+1) );
rand();
}
>>
>>59622430
>Tfw too intelligent to learn
Ftfy
>>
File: 1489461328707.png (740KB, 1834x1200px) Image search: [Google]
1489461328707.png
740KB, 1834x1200px
>>59626392
>tfw
>>
File: 1487216132937.jpg (26KB, 256x256px) Image search: [Google]
1487216132937.jpg
26KB, 256x256px
ITT people who never wrote anything substantial in C shit on C.
>>
>>59626435
>anything substantial
>in C
>>
>>59626447
Is the Linux kernel substantial?
>>
>>59623254
This desu.
Hate C all you want, you should know it anyways. If you don't know how to use C and ASM then don't go around saying you know jack or jill about computers.
This >>59622430 tired old copypasta is just a poojeets projection of his own low intelligence.
>>
>>59625985
>C doesn't even have generics
The current standard C11 has "generics". Overall pretty decent post.
>>
>>59626494
no, NT is
>>
>>59626494
Did you write it? If not, you're not fit to defend C.
>>
>>59626505
stop samefagging and respond to >>59625548
>>
>>59626411
C isn't about using all these fancy features to stroke your fragile ego on a tibetan basket weaving forum.
Don't use C if you want those things. Many of the things in that pic can be implemented in C, but are not. Do you know why? Because if the programmers needed those features (keyword: needed) they would move up the ladder of languages until they found the right balance of performance, features, and development time.
>>
>>59626602
>f the programmers needed those features (keyword: needed) they would move up the ladder of languages until they found the right balance of performance, features, and development time.
Welcome to C++. The language that has restricted C only to kernels and embedded chips
>>
>>59626602
Lo and behold, most of them have, apart from a thin minority of tryhards on /g/ cargo-culting their unix greyboard heroes by refusing to part with the obsolete tools they heard they used.
>>
Yes, but it's generally not worth writing production code in.
>>
>>59626519
No, and I haven't written a truly substantial project in pure C. I've written smaller things, and don't use C for large projects because I'm not a masochist or a kernel dev.

However what makes C important today is that it teaches you how things work. I've avoided lots of mistakes and inefficient code by knowing how things work. And that comes from learning to program in C before learning a language that obfuscates what's actually happening under layers of objects and frameworks.
>>
File: 1406037853979s.jpg (8KB, 250x250px) Image search: [Google]
1406037853979s.jpg
8KB, 250x250px
>>59622430
Terry Davis has some choice words for you!

Start at 26m52s
https://youtu.be/vakWMNA1oWc?t=26m52s

19m6s
https://youtu.be/vakWMNA1oWc?t=19m6s
>>
>>59626534
That wasn't me, but okay.
>Then you don't know any real Engineers
Why is that? Why wouldn't a computer engineer know C, or ASM? Why are you not a real engineer if you know these things?
>Oxymoron
Both the C and C++ standard define strings as a char array terminated by a 0 byte.
I don't know what planet you are from shill.
>>59626631
I agree, use the best tool for the job.
>>
>>59626683
>Terry Davis
Stay contained in your autism hugbox thread fucktard. Fuck off
>>
File: 1490417162757.png (196KB, 1282x1055px) Image search: [Google]
1490417162757.png
196KB, 1282x1055px
>>59626689
>wouldn't a computer engineer know C, or ASM
Not all engineers are computer engineers and it's a disgrace for engineers that computer engineers call themselves engineers. It's a shame that Computer "science" is still an live buzzword

Strings and char[] are different
>>
>>59626683
Why are you shilling that autistic gay cuck basement dwelling youtube vlogger here?
>>
>>59626750
>Not all engineers are computer engineers and it's a disgrace for engineers that computer engineers call themselves engineers. It's a shame that Computer "science" is still an live buzzword
The Engineers you are probably referring to use Fortran lmao.
Why is it a disgrace for computer engineers to call themselves engineers? Are computers not important? Aren't they complicated? Do they not run the world?

>Strings and char[] are different
Yeah, a string is a char array with a 0 byte.
>>
>>59626128
you do realize that languages can switch underlying languages, right? afaik Golang used to be 100% C but they switched over to.. well, Golang
>>
>>59626702
Lol. I know all flavors of C. All are great. C definitely has its uses over C# and C# has its uses over C. Quit being a faggot and just use the right tool for the job.
>>
>>59626770
fuck off nigger
>>
>>59626859
Jesus christ you drooling autist when did I talk about C# in the first place. Just fuck off back to your autism containment thread immediately
>>
>>59626838
Yes, I realize that. I'm not sure you're actually disagreeing with what I posted, though, as that just demonstrates "the performance critical shit" need not be written in C
>>
>>59626859
>C#
>Flavour of C
That's about as accurate as saying Javascript is a flavour of C.
>>
>>59626913
kys faggot. I didn't say you did. I was making a point about using the right tools for the job. calling me an autist lol
>>
>>59626111
>guaranteed memory exploits and security vulnerabilities
>what is Coq/Isabelle
>>
>>59626930
>taking an autist seriously
>>
>>59626939
>calling me an autist lol
I'm not the one who follows an autistic manchild youtube vlogger and circle jerks about him in 4chen
>>
>>59626944
Those are proof assistants.

If you want to be a faggot and namedrop elaborate statically typed academic languages no one uses, at least pick one that could hypothetically be used for general programming, e.g. Idris.
>>
>>59626930
hurr durr I don't have a proper counterargument so I'm going to insult your use of english
>>
File: well meme'd.jpg (61KB, 680x592px) Image search: [Google]
well meme'd.jpg
61KB, 680x592px
>>59624725
>* Scala is worthless.
>* Java is slow as fuck.
>VB.NET is pretty decent in terms of performance
>>
>>59626979
He's not insulting your English you fucking autist
>>
>>59626978
Yeah and what are proof assistants used for? Certainly not to guarantee program safety and correctness? Fucking idiot, learn when to shut up.
>>
>>59626979
You implied C# is a flavor of C, idiot
>>
>>59626987
shutup you fucking autist
>>
>>59627005
Why are you still here? Aren't you supposed to be watching your daily dose of autistic manchild vlog in youtube?
>>
>>59627001
>Getting hung up on my use of the word "flavor"
Its hilarious how you guys argue. You aren't even making a point anymore.
>>
>>59626994
>Yeah and what are proof assistants used for?

Not the same category of programs as C and assembly for sure. Stop being so defensive you filthy whore.
>>
>>59627023
>Its hilarious how you guys argue
Do you realize you have mental disorder?
>>
>>59627025
You're missing the point because you have no idea about how things work in safety critical environments. They're used in combination.
>>
>>59627039
terry shitposters are autistic. What's new?
>>
>>59627063
Why are we allowing them outside their day care threads?
>>
>>59627039
LOL

Looks at self.
>Millennial
>Owns house
>Has safe job in IT in the education sector
>Classic car in drive
>Wife
>Piles of money
>Shooting the shit on 4tran while waiting for dinner

You:

>Lives in moms basement
>Has no hope of a future
>Getting triggered over his dear little programming language and his autist level knowledge
>>
>>59627084
>Millennial
I know
>Wife
Oh boy
>Has safe job in IT in the education sector
>"""Piles""" of mony
Ohh boy

Fuck off autist
>>
>>59627068
>>59627063
>>59626954
>>59626770
>>59626702
Make sure to look both ways before you cross the street CIA nigger
>>
>>59627084
>Millennial
>NEET
>Virgin
>Unhireable
>Autistic
>Watch youtube vlogs 24/7
FTFY
>>
>>59627097
Ok autist
>>
The C Programming Language is the only programming book I've read and I'm thriving a full stack dev.
>>
>>59627084
>Lives in moms basement
>Has no hope of a future
>Watch t*ry on youtube and make threads about him on 4chan
>Call people CIA niggers xD
Yeah we know
>>
>>59627097
Get out
>>
>>59627084
>Milennial
>Wife
Autism is preventing you from your dream role-play
>>
>>59625668
Similar language. C++ is object oriented.
You don't have to learn C first though, you'll manage.
>>
>>59626519
If I didn't write the Linux kernel, I am not fit to defend C? Wat?
The question asked if anything substantial was written in C, desu
>>
>>59627734
I would say you get more out of C than you get out of C++.
>>
>>59626073
>Rust
>"hurr durr i'll use a stupid example like an idiot"
I would expect Rust libraries to be written in Rust.

>>59626128
>Even Haskell's runtime implementation is in a subset of the language itself.
Oh really? Pic related.

>This idiot seriously thinks every language ever made is written in C.
That's not what was said, idiot.
>>
>>59626647
>fastest by orders of magnitude
>"obsolete"

The one drawback of Moore's Law is that it allowed turds like you to pretend to be "programmers."
>>
>>59629299
C isn't "orders of magnitude" faster than C++ or Rust. Don't use mathematical terminology if you don't understand basic math.

I'd tell you not to pretend to be a systems programmer if you don't understand basic math either, but that ship sailed a long time ago on this board.
>>
I use C the most as a computer engineer. I write firmware though. Its different programming though when you have to deal with the physical registers as well as the timing for the clock, also you have to get used to using interrupts.
>>
>>59622430
pointless insults and refusing to acknowledge some of C's strengths will not win anybody over
>>
>>59625985

>C++ doesn't have strings

Nigga wut?
>>
>>59624725
wait where the fuck did this meme that Java is slow come from? Sure, it's no where near the speed of C/C++, but it's pretty damn swift.
verbose != slow
(anyways Java isn't as verbose as memers would have you believe)
>>
>>59629602
"They're not part of language specification itself but merely part of the standard library, so they don't count."

He was just lashing out with pedantry and unwarranted condescension because he got backed into a corner.
>>
You have to learn how the language and syntax works, but you don't actually have to do any programming in c++ unless you are working with hardware.
>>
>>59622104
if you can’t explain why while (*a++ = *p++); copies a string, or if that isn’t the most natural thing in the world to you, well, you’re programming based on superstition, as far as I’m concerned: a medical doctor who doesn’t know basic anatomy, passing out prescriptions based on what the pharma sales babe said would work.
>>
>>59629659
also,
http://benchmarksgame.alioth.debian.org/u64q/csharp.html
C# BTFO, both in memory usage and in raw speed
>>
>>59629700

Obviously I'm a faggot so i must be wrong.
>>
>>59629705
my C skills aren't great, but I'll give it a shot:
use pointer arithmetic to assign values in p to a, and when p reaches the null terminating character, the entire expression will be 0, which is the exit condition.
>>
>>59629466
>C isn't "orders of magnitude" faster than C++
That's because C++ is a superset of C you dolt.

>or Rust.
Rust has good performance. I'm referring to the Python's, Scala's, and Java's of the world.

>Don't use mathematical terminology if you don't understand basic math.
Fuck you. I used "orders of magnitude" because that is often the speed gap between C and Python, Java, sometimes even C#.

>I'd tell you not to pretend to be a systems programmer if you don't understand basic math either,
Says the guy pretending.
>>
>>59629659
>wait where the fuck did this meme that Java is slow come from?
Because it is slow.

>muh benchmarks!
At this point I'm inclined to believe any benchmarks which show favorable results for Java are tweaked. Java is consistently one of the slower languages at code competition sites.
>>
C++ is superior!
>>
>>59631311
>That's because C++ is a superset of C you dolt.
No it's not.
>>
>>59626986
>he thinks VB.NET is slow because it has "VB" in the name

C# and VB.NET are the same thing under the hood. Same runtime, JIT, memory management, framework, bytecode, etc, etc.

If something is fast in C#, it should be about the same in VB.NET.
>>
>>59631346
>any C function will compile in C++
>"C++ is a completely separate language, not a superset"
>>
>>59631359
int *ptr = malloc(sizeof *ptr);

Valid C, invalid C++.
And this is just the trivial case.
>>
>>59622430
This.
Thanks to the ten base number system that was invented in India. All foundation of technology is originated from India. This is why Indians have superior thinking which is why they are the smartest.
>>
>>59629256
>that level of damage control
this is just sad!
>>
>>59631346
It's a superset. Not a subset so he's completely right
>>
>>59631465
See >>59631368
>>
>>59631485
Do you understand the difference between a subset and a superset?
>>
>>59631491
Do you?
Are you saying that C++ is a superset of C, despite the fact there exists things in the set of valid C programs which does not exist in the set of valid C++ programs?
>>
File: wznBM.png (44KB, 575x472px) Image search: [Google]
wznBM.png
44KB, 575x472px
>>59631465
>>59631491
It's not a complete subset. However C is so small you might call it a subset
>>
>>59631558
>It's not a complete subset
Then it's not a subset. "Almost" subsets mean fucking nothing.
Also, the differences between the languages are probably more than you realise.
>>
File: 1479593065912.jpg (89KB, 416x1023px) Image search: [Google]
1479593065912.jpg
89KB, 416x1023px
>>59622430
>all that people falling for this old pasta
>>
>>59631700
>still cannot recover from an old pasta
>>
>>59621350
Yes
>>
Absolutely not.

Learn a useful and lucrative language like Javascript.

C (and C++) are memes. Sorry to break it to you.
>>
>>59625857
it means spark in Russian
>>
>>59624725
Coding competitions are not software development fag
>>
>>59631351
Not always.
Remember IL code produced sometimes is different from VB and C#
>>
>>59625634
Yes, C is for control freaks solving a focused enough problem to not shoot themselves in the foot
>>
>>59621350
Learn C. It's more than likely the phone/computer you own uses it. It's the inner workings of OSs. Also you'll get a grasp on memory management which will make you a much more efficient programmer than someone who started with Java. Most of all learn the data structures not the constructs (i.e linked lists, stacks and queues, tree, graphs, etc). After you have a basic grasp move onto C++. Congratulations you are a competent programming. Good luck OP.
>>
>>59632884
to add, you'll pick up on other languages extremely quickly after learning C/C++.
>>
>>59631331
you're gonna have to back that claim up.
at the very least java beats out C# and sometimes beats out C++
>>
> PORTBC |= 1 << SERV_PIN;

What can be more beautiful than that?
>>
will mastering C help me get a kickass embedded programming job?
>>
>>59632980
Yes. C+soldering skills+basic physics knowledge = embedded job.
>>
>>59631368
>hurr durr what is
int *ptr = (int*)malloc(sizeof *ptr);


Don't be a pedantic slut.

>>59631514
>minor changes which are trivial to include in C so that code compiles in C++
>HURR DURR DIFFERENT LANGUAGES

This entire fucking sub thread started because someone said C was generally faster than other languages, and some FUCKING IDIOT said "no it's not faster than C++" as if C++ was a valid counter example.

>>59631656
>hurr durr all or knowing
>herp derp muh binary thinking
>>
>>59632530
>competing for optimal algorithm design is not "development"
>consistent speed differences over multiple challenges means nothing
>t. Butthurt Java Pajeet

Can you even FizzBuzz? Or is "development" in your world the act of copying/pasting from StackOverflow?
>>
File: 190.jpg (22KB, 427x464px) Image search: [Google]
190.jpg
22KB, 427x464px
>>59632920
>java sometimes beats out c++
>>
>>59633749
>>hurr durr what is
>int *ptr = (int*)malloc(sizeof *ptr);
A different piece of code.
>>minor changes
A presented a trivial case. There is more than that.
Here is a slightly less trivial case.
void fn(int n)
{
int arr[n];
}

Please make sure your code goes through
-std=c++14 -Wpedantic -Werror
before posting any stupid counter examples.
>muh binary thinking
Subsetting is a yes or no question. There is no "maybe" or "sort of".
>>
>>59622920
char * strcpy...
>>
File: mememachine.jpg (116KB, 445x629px) Image search: [Google]
mememachine.jpg
116KB, 445x629px
>>
>>59633833
>Here is a slightly less trivial case.
Some compilers/IDEs whine, some do not. Xcode does not even when set to c++14 dialect. That function will compile.

Note that the option is labeled DIALECT. Not language. I wonder why?

>Subsetting is a yes or no question.
Except that it's not outside of a formal math setting. And this is a discussion thread, not a paper on mathematics.

And even if by some strict, formal definition C++ is an different language than C, it is still not a valid counter example to the statement "in general, C is faster than higher level languages" because of the shared syntax, libraries, and especially features and compiler internals.

Now fuck off.
>>
>>59634005
>Some compilers/IDEs whine, some do not.
VLAs are not a C++ feature. Some compilers accept them as a non-standard extension.
>the shared syntax
Do you know some C syntax that C++ is missing? "Restrict".
That alone give C a huge edge over C++ in terms of performance.
>>
>>59634072
>british say "forwards"
>americans say "forward"
>HURR DURR AMERICANS DO NOT SPEAK ENGLISH
>>
>>59632920
>>59633804

Basically the differnce between C++ and Java is tiny.

Also:
>Since performance optimizing is a very complex issue, it is very difficult to quantify the performance difference between C++ and Java in general terms, and most benchmarks are unreliable and biased. Given the very different natures of the languages, definitive qualitative differences are also difficult to draw.

>https://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
>>
>>59634127

This is correct, us "english" is a bad rip off.
Your point?
Thread posts: 215
Thread images: 17


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.