C is a disservice to intelligent programmers...

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

Other urls found in this thread:

jonathanwhiting.com/writing/blog/games_in_c/
twitter.com/SFWRedditVideos

C BTFO

don't samefag, OP.

Look at the IP count

C BTFO

C is faster

>No valid counterarguments

C programmers confirmed for being brainlets.

>C++
Inferior version of D

Real men don't need those features

>Someones mad they can't learn C

nice bait

>It has almost 0 features that a modern and intelligent programmer uses to be productive.
You use C when saving computer time is more important than saving programmer time.

That used to always be the case back when the worlds' fastest supercomputers were less powerful than the microcontoller that runs your microwave oven today. Now its seldom the case for applications, but it still is (and always will be) for OS, server, and systems software, because millions of instances of those programs are running all the time, all over the world, in performance-sensitive applications.

Plus its a lingua franca. Any hardware you care to name has a C compiler targeting it. Any OS has a C compiler targeting it. You can compile C code to run on hardware that has no OS. Every language can call C library code. Anything you can do with a computer, you can do in C. The VMs and runtimes and interpreters of other languages have to be implemented in something. Eventually there has to be a foundation to your tower of abstractions. That foundation is built with C.

>C is a disservice to intelligent programmers.
>C doesn't have modern features

it was written in the 70's my dude

The 70's

Are you gonna complain about how you can't get on youporn on a rotary telephone next?

Never Forget

If you're in infosec you need to learn C because buffer overruns are still a big fucking deal in 2017, which is kinda pathetic.

Rust is still a SJW language though.

>Are you gonna complain about how you can't get on youporn on a rotary telephone next?
A clever man would be able to.

The reason Rust is being pushed so hard is because social justice warriors have found great difficulty penetrating the communities of open source system coders who use C and/or C++.

The "safety" features give advantages to lobotomised Feminist studies "coders" who are trying to "disrupt" these communities while breaking the knee caps of everyone else who knows what they are doing.

Literally nothing in Rust actually solves problems that haven't already been solved by RAII in C++ and even some GC/stack/heap techniques in the arguably superior but slower D compiler.

The advocates are all social justice warriors and this is their "long march through the development communities". They are employing critical theory against their main targets C and C++, by criticising everything it is and does and demonising its users. They've held back their "cis het white male" jargonism for now, but once they have established a foot hold "killer app", expect them to go wild with it. Just read through the big throbbing CoC they've erected on their main website.

Rust is kill. Don't touch it, spit on all its advocates.

int thread(){
return 0;
}

I love coding and I was the bully in school

> It's fucking old and it does not have features
Might as well say paper is old and needs to be replaced by tablets because tablets can display gifs

pot yfw newspapers are going extinct in favour of tablets

C and Haskell are good for students and pajeets for learning despite that they're not often preferred. This board consists of students and shitskin pajeets.

>He doesn't code in assembly and c.
The current state of Sup Forums folks.

How am I gonna do dynamic method loading on a toaster processor? You ever see Python running on an Arduino? C is good for tiny shitty systems and anywhere else you need to be close to the metal.

>he can't implement recursive functions in assembly

absolutely fucking disgraceful

but Real Men program in Fortran

>C is a small language
Yea you right. C is simple itself. But you know how to use it right and don't get fucked up you must know many things about how your OS works, about memory management, you must know algorithms and data structures because C doesn't contain any. To write something that works in C you must have a solid background of CS. C is the most low of high level languages and it's pretty close to asm.

So BTFO uneducated web monkey.

lol

I only learn this POS because of microcontrollers (ARM).

Except that rust is pretty damn great as a drop in C replacement? I mean I'm a fuckin Nazi by SJW standards, but I mean it and Kotlin are just kinda nutworthy.

>C doesn't have strings
Wat, just get yourself
>C doesn't have string concatenation
Write your own concat function.
Read Kochans programming in C for newbies and by chapter 9 you'll learn.

They both replace ancient shit syntax with a lot better one.

>he can't use a shortcut with another shortcut
>how do I into assembly?

At least know the general concept of an assembly language before talking garbage bait.

You can do literally anything you want to in C. These people bitching about C are just too stupid to do anything more than import coolProgram
coolProgram.run()

you can do anything you want in ASM, there's simply little point wasting your time on such minutia.

/thread

>tfw I unironically can write the x86 assembly behind any C idiom

rust has a disgusting syntax.

C has some cruft here and there but it's nothing compared to most modern languages. Plus you only have to learn maybe 10 features and you know the entire language.

String concatenation isn't even hard. I wrote an arbitrary length string concatenation function in less than ten minutes and the only error I had was I forget to check for a null pointer from malloc.

>implying you need anything more than pointers, structs, and functions

minimalism is perhaps the nicest thing about C desu
But considering how small the language is, there are a lot of traps to fall into.

>only

It's really more that the language doesn't put up any fences for you to run into. Even then, the only real problems come down to retards not thinking how they're indexing arrays through, along with not null terminating strings. That's where 99% of the shit comes from. Everything else is ultimately not harmful or equivalent to mistakes you can make in any language.

samefag
I know you're trolling Sup Forums OP with the copypastas and playing both sides, but please add some new ones, it gets boring after awhile.

>C doesn't have X
Look up C11 you nigga
>no unit tests
People who work in C has had unit tests since always.
>C is a disservice to intelligent programmers.
To be a real programmer, you need to understand how a computer works.
So you have to learn in this order:
>assembler
>C
>An OO language
And then you can downgrade yourself to python or JS pajeet if you want. But jumping straight to the pajeet bucket you will always be clueless about what is going on.

It absolutely does, C is full of retarded shit that will trip you up if you're made aware of it like array decay and ass-backwards declarator syntax.
The language is simply small enough that you can keep it in your mind all at once.

*if you're not made aware of it

if c++ is so good, then how come you can't make a kernel worth a fuck in it?

/thread

a good portion of those things plus modules were already invented before

I love programming and I was both.
Where is your god now?

>implying you need structs and functions

>C doesn't have resizable arrays
realloc
>C doesn't have strings
It has ASCII strings, and some support for unicode strings.
>C doesn't have string concatenation
strcat
>C doesn't have namespaces
namespace_functionname();
>C doesn't have exception handling
It's trash
>C doesn't have unit tests
It has unit testing frameworks
>C doesn't have memory safety of any kind
This is not a problem
>C doesn't support dynamic method loading/creating
You're a retard who doesn't know what their talking about
>C doesn't even have generics and templates
Macros
>C doesn't have meta programming
Macros
>C doesn't have higher order functions
Yes it does you fucking retard, it has function pointers.
>C doesn't have contract programming
assert
>C doesn't have inner classes
it has inner structs

You're a fucking idiot who has no programming experience and who doesn't even know what they're talking about.

t. C++ and Rust fag.

pretty much /thread
OP represents everything I hate about this board.

finnally

>>C doesn't have meta programming
>Macros
kek

Search faggot, more metaprogramming articles about C since before you were born.

/thread

>C
>"""macros"""
I chuckled why do C tards pretend to think they know what they are talking about

Tagged unions my sis

>C is a cancer that plagues the modern software industry
C is reason the modern software industry exists.
You can do everything you listed in C as it offers you all the tools you need.
Just don't be a retard and do some r&d before.

jonathanwhiting.com/writing/blog/games_in_c/

Take a look at Knossu, one of his games. It's a marvel of form and ambiance.

>It is fast, and when it comes to compilation I can't think of anything faster.
opinion discarded

>bare pointers with no type information are arrays
>prepending a string to all your symbols is namespaces
>text substitution on par with awk is metaprogramming and generics
>function pointers are closures

Just played it, pretty cool. Although since it's a raytracer, it could do some more freaky stuff it didn't.

You can make literally anything with c if you know how to program it

you can say the same for ASM

>>bare pointers with no type information are arrays
You're an idiot. You think arrays have type information? you think bare pointers don't have type information? you're a fucking retarded idiot. You have no idea what you're talking about.
>>prepending a string to all your symbols is namespaces
Correct.
>>text substitution on par with awk is metaprogramming and generics
A primitive form, correct.
>>function pointers are closures
I never said that.
But you could emulate closures, not sure why you would ever want to, though.
Passing function pointers around is plenty enough.

>You think arrays have type information?
They literally do.
int main()
{
int foo[4];
int bar[5];
printf("%lud %lud %lud", sizeof(int), sizeof foo, sizeof bar);
} // 4, 16, 20

Pointers do not tell you anything about the size of the array they point to, arrays do. You're not a very good C programmer if you don't understand array decay.

>But you could emulate closures
That's not saying anything, you can emulate any feature in any Turing complete language. You

Literally this.

>Pointers do not tell you anything about the size of the array they point to, arrays do. You're not a very good C programmer if you don't understand array decay.
No, you're a fucking idiot who doesn't understand what "type information" is.
Protip: maintaining a length field isn't type information.

This is trivial to do in C:
struct ArrayOfThing {
struct Thing *things;
size_t length;
};


You're not a very good programmer if you don't know how to do at least 3/4 of the list in the OP in C.

Exactly, so it's wrong to say that C "can't do them".

I use C++ because it makes those things more convenient and intuitive, but saying that C can't do them is fucking retarded, and you're an idiot if you don't know how to do them in C.

>C doesn't have strings
>C doesn't have string concatenation
your opinion is invalid

You really cannot call yourself intelligent if you can't implement those things in C.

couldn't have said it better

Array length is type information. Stop embarrassing yourself.
The reason for array decay was to preserve compatibility with B and BCPL, neither of which had arrays.

sysadmin of 2 years, tried learning C++ ,- fuck that.
I code in python because I can rip through and steal already made code and have it whip my datacenter into shape, and at home, do things for me automatically.

The only actual turn off of C is that you need to know what the hell the compiler plans on doing constantly, and that the entire language is compiler based. There is no 'C' interpreter. The tools needed are bought and purchased at $1.5k prices via embacadaadaderthen (embacadero/borlands) or Visual Studio Shill.

C will not die. It is needed. Just not liked.

>Array length is type information.
No it isn't you fucking idiot.
Types exist at compile time only.
The length of an array cannot always be known at compile time.
The array length is just a field stored with the array, it is NOT part of the type, whatsoever.

YOU stop embarrassing yourself, you have absolutely no idea what you're talking about.

>You use C when saving computer time is more important than saving programmer time.
Pretty much this. You can use C to take advantage of the hardware better and manipulate memory more efficiently.

>muh features to make me more productive
C separates "coders" from computers scientists.

You seem to be confused, user. Arrays don't store their length anywhere. The length is part of the type information that the compiler uses to do stuff like sizeof.

>Arrays don't store their length anywhere
In C.
>The length is part of the type information that the compiler uses to do stuff like sizeof
In C, and no, and if by length you mean the size of the array in bytes, yes.

For things like this in Rust:
fn foo(arr: &[i32]) {
arr.len();
// ...
}


the .len() is not type information at all.

You originally said:
>>bare pointers with no type information are arrays
Implying that having a length field is type information.

Yes, I'm only talking about C arrays of the form type name[size].

I did not make the comment about bare pointers being arrays. I don't think that makes any sense.

C style array type information is the difference between
int arr[2]; // an array
int* p = arr; // not an array

So, what's your point?

>The reason for array decay was to preserve compatibility with B and BCPL, neither of which had arrays.
If arrays were passed as arrays instead of pointers, then you'd have the same problem that early Pascal did, that you wouldn't be able to write functions working on arbitrary sized arrays. Many C functions do use "sized array" by passing the size as a separate parameter, but to do that at the language level rather than the library level would require a great deal of added complexity for little real benefit. If passing around arrays of varying size is something that comes up in your program, it's trivial to write a struct combining a pointier and a size member, which is really what your "arrays" are about, only it's not mandatory in places where it would actually be counter-productive.

>>If arrays were passed as arrays instead of pointers
Then you would explicitly pass a pointer to the array.
I agree with your points. My complaint with the language is basically one of semantic inconsistency:
void foo(int arr[])
{
sizeof(arr); // sizeof int*
}

int main()
{
int arr[3];
sizeof(arr); // sizeof int*3
foo(arr);
return 0;
}


And of course, this is common enough that gcc has a specific warning for it.

This.

> doesn't code in scheme

It should be pretty evident for the skilled C programmer that an arbitrarily-sized array will be passed by pointer.

That same argument could be made for every dumb design decision in any language.

So, how would you handle it? magic?
It actually makes complete sense.

>int arr[]
unknown size

>int arr[3]
size known, 3

Go fuck yourself.

>he doesn't program in machine code
laughing_whores.webp

How about this

void foo(int arr[3]) {
printf("%lu\n", sizeof(arr));
}

int main ()
{
int arr[3];
printf("%lu\n", sizeof(arr));
foo(arr);
return 0;
}

12
8


Still not convinced it is a stupid decision to pretend you can pass arrays? Why not give up the charade and just be explicit about passing pointers?

Ok fine, you win.
But no one does that anyway, and nothing is forcing you to.

>to pretend you can pass arrays
At no point in learning C was I under the impression I could pass arrays. From the very beginning the distinction was made that arrays were passed by reference and not by value, and that arrays were really just nice syntax for dealing with pointers.

As has been mentioned if you need more abstracted arrays you can wrap them in a struct with functions to deal with them.

>realloc
>It has ASCII strings, and some support for unicode strings.

You write many more lines of code to perform functionality that could be implemented with much fewer lines in C++.

>namespace_functionname();

That's not a namespace because its usage is not enforced.

>It's trash

Lol, you're not a real programmer if think exception handling is trash.

>This is not a problem

It's not a problem if you're writing small programs.

>it has inner structs

Inner structs aren't comparable to inner classes. Good like trying to initialize your inner classes without writing tons of spaghetti code and pseudo-namespacing.

Any C can do, C++ can do. Your argument is invalid.