Why does C seem to be the only sane language that exists?

Why does C seem to be the only sane language that exists?

It's not bloated, it's not cryptic, it's you handling bytes using functions; that's the fuck it. Everything else (classes, inheritance, exceptions, any and all kinds of automatic memory management...), are nothing but bloat which does nothing but obfuscate what it is you're actually doing to the point where it's hard for even you to keep up, given enough time, given a big enough project. If it's not C it's hot garbo (or it's a scripting language, in which case, who cares).

I've been working with just C (not a C subset of C++, I mean actual C11) for the past six months, and I gotta say, this shit's better than anything else any other faggot shit out to "make life easier", and this is coming from someone who has to deal with java daily, and who's first language was C++.

Why aren't you using C right now, and why are programmers today such onions boys?

Attached: 4c83beeea90058c0747326748467b915.jpg (500x706, 325K)

Other urls found in this thread:

stroustrup.com/bs_faq2.html#sort
youtube.com/watch?v=P5tFJ9umhvk
twitter.com/NSFWRedditImage

>I mean actual C11
>not C99

Do you go out of your room only to ask for food to your mother stinky virgin

>only one language allowed
I use whats best for the project like a sane human being

>C
>sane

Because modern programming languages are made with retards in mind.
>companies think the wages of programmers are too high
>want to lower their wages by saturating the market
>more people means more idiots are bound to join
>modern programming languages need a safety measure around everything to prevent idiot programmers from fucking up

Attached: 1556459369432.jpg (1232x424, 119K)

stroustrup.com/bs_faq2.html#sort

sort(vec.begin(),vec.end());
is far more difficult to understand, since you have the whole vector ecosystem to deal with besides the actual sorting itself, not to mention the overloading. You're delusional if you think this is somehow clearer than the alternative.

Any beginner with a basic grasp on language features would find
qsort(array,asize,sizeof(elem),elem_compare);
no problem to understand.

Attached: 1515975179913.png (777x1097, 598K)

The recent poltkit vulnerabilities only occured because "unbloated" C has no fucking real classes or proper error handling. Shit wouldn't have even been possible in Ada and extremely difficult to do in C++. C is an insecure , unproductive, piece of shit of language with some of the most idiotic poorly made syntax ever created. It would be one thing if it stayed dead and buried along with that trash operating system Unix in the Bell Labs but it instead it had to set computing back 30 years which makes it all the more repulsive.

Well you're wrong and qsort is slower because of the function pointer indirection.

I honestly don't know man.

I'm reading SICP so I guess my main language right now is Scheme. Even though I'm just like 50 pages in....

Attached: 31556922_372273333282397_8732959365188812800_n.jpg (750x750, 78K)

No, I'm really not wrong. But thanks for posting that because it shows my point perfectly.

>Scheme
We're talking about languages meant to be compiled and fast here, not interpreted languages. If I could have common LISP compiled to assembly, there would be no other language in this world for me.

>unproductive
you say that like its a bad thing. way too many of our problems are cause by programmers writing too much code, and beyond that writing it too quickly. The result is a whole lot of poorly thought out garbage that we'd really be better off without.

How's your intro to C class going? Pretty obvious you're high on your on farts and dont have any real world experience

You seem to mistake abstraction for bloat.

>function with four parameters is simpler than function with two parameters
>literally only requires you to understand iterators, which is something you need to know for many other reasons

Bitch, I've been programming for 12 years. C++ was my first language, if you're wondering.

>>literally only requires you to understand iterators
You know that's not true.

12 years and you're still a neet? Damn

Shit dude, you sure got me with your completely incorrect ad hominem.

At work I have to deal with java and PHP mostly. I never liked either, but I usually used C++ for personal projects. Actually sitting down and writing shit with C made me realize how freeing and fast it is not to have a million things to consider and deal with on top of everything you usually have to deal with when programming (partitioning functionality and handling state). Is it perfect? No, not really, but the only problems that there are are syntax issues (like having to write struct / typedef structs all the time), because other than that it's pretty on point.

My first language was Actionscript and now I program in Javascript :3

Attached: javascript.png (512x512, 547K)

Because you've never written 68000 assembly.

Attached: 1538189278507.png (1920x1080, 2.21M)

Small scale memory management I find is often easier to do in assembly.

how do you do, my fellow demoscene schizophreniac?

C++ iterators are shit, in a sane language there'd only be one parameter

Luckily C++20 will have ranges. Should've been there a decade or two ago but it's better than never.

heh

Attached: alien_programming_dictatorship_off_lisp_sticker-rc461c26f1cd94434aa4ecea3c8e4f0c0_v9waf_8byvr_324.jp (324x324, 22K)

ranges look like shit

common lisp is a heap of shit

Assembly is not a good language to quickly express mathematical formulas with. That's one of the things C brings to the table.

Oh shut the fuck up. Programming is the application of algorithms and creation of the environment to support it. There are no bytes in math, no pointers, no memory allocators. Therefore, its wrong to stick your head in the sand and blind yourself. You're just a code monkey if thats all you care about. If you want minimalism, try Prolog or Haskell.
Alexander Stepanov knows much more than you and I and he chose C++ instead. Read up on why.

> obfuscating bad
It's called black box abstraction, it's the reason why people can stop focusing on doing simple tasks over and over, and start focusing on making greater, more complex solutions to more complex problems, utilizing lower level programs other people have made as building blocks, needing only to know what input and output is required, without having to care about how it does what it does.

>There are no bytes in math, no pointers, no memory allocators.
But there are in computers, you idiot.

So make computers without bytes and call me. It will suffice to make basic types as int, float, etc that approximate numbers. Dumnass code monkey. Today we work with bits, tomorrow qbits, then wbits... C, then rust, then shmust. What stays is math, the rest is situational garbage information code monkeys handle.

>Today we work with bits, tomorrow qbits, then wbits
Yes, I'm talking about today, you idiot. I'm literally talking about programming modern day computers, go figure, huh?

I can program everything you can but also back up my choices with solid computer science theory. You merely gaze at SLOC and babbys first programming language. What, can't handle deeper thought? Need everything to be spelled out for you?
If you can't handle abstractions or make code that lasts using modern languages and modern design principles, you're an amateur.

>If I could have common LISP compiled to assembly, there would be no other language in this world for me.

LISPs have had compilers since before C existed.
Hell, you can even access the compiler from right inside a REPL and see what individual functions are turned into.

I've been using C99 in a large codebase for the last 4 years and every single fucking time somebody new comes on they want to use C++.
We let them try. Try and try and try. And every time we see performance hits. Big ones. The worst was some fresh masters grad who thought he could do fucking anything and it ran 5x slower.

C is eternal because everything else gets in the way.

Only white people use C these days.

Objectively wrong it's the most popular language in India. Cope Cnile.

I mean without an extensive underlying environment.

This is the dumbest thing I've ever read.
>It's not about BYTES and MEMORY! You shouldn't ever play with BYTES and MEMORY!
>OH YEAH WELL I KNOW THEORY! I'M A THEORIST! I HAVE BACKING WITHOUT YOUR PRECIOUS BYTES!

>You seem to mistake abstraction for bloat.
You seem to mistake C for a language without abstraction.

I'm good thank you.

Attached: 1542880876685.png (1309x874, 644K)

It's a language without many forms of useful abstraction.

Like what?

You are right, but you should use C99.
I have been working mostly in C for a while, and i don't miss anything really.
For webstuff I use go though, since its pretty sane as well.

>useful abstraction
I'm sure much of what you define as useful abstraction is actually bloat. Abstractions with only very marginal gains to areas that don't really matter all that much.
And often I see people trade that for ease of refactoring. That's probably what bothers me the most. C doesn't really get worked like copper. Lots of languages do.

No kinds of polymorphism, you're just supposed to hack it together yourself. Which happens a lot, don't kid yourself.

>No kinds of polymorphism
Said someone who doesn't know what they're talking about. No point in continuing this conversation.
>happens a lot
It happens a lot if you choose to ignore everything that matters in favor of dogma. That's my experience.

>C doesn't really get worked like copper. Lots of languages do.
what is macro hell

>No kinds of polymorphism
That's just flat out wrong. And no I'm not talking about void pointers.

Most of our codebase is comprised of an intricate series of macros, everything from looping over structures to generating function call names and pointers to generating struct types and their allocators is done through macros.

They are really hard to break unknowingly. Way harder than you'd think.

No subtype polymorphism, no parametric polymorphism, no adhoc polymorphism... function pointers and the first-struct-member rule exist but they're not polymorphism in and of themselves, they're just means to achieve it. Using them to do so is error prone and ugly as well, yet that happens everywhere in C projects.

Probably because you just finished the first year of your cs degree and have never worked a day in your life, let alone on a project with millions of lines of code.

>Subtype polymorphism
Does with proper struct design
>Parametric
Does with proper macro design
>Adhoc polymorphism
Garbage, but sure.

Not that I'd advocate using C and macro systems to do all of these things if you don't have to, but the point is you CAN do them. Sanely, too, before you pull out the BUH BUH BUH THAT LEADS TO BUUUUUGS cards. Properly designed macros explode incredibly easily when used improperly.

>No (...) polymorphism
Not him, but thank god for that.
Also, imagine not being able to handle function pointers.

You cope whiteoid

It's a deprecated lang.

>what is macro hell
Arguably the macros introduce a need for greater codebase understanding. That's the only issue I see on that front. They're not especially bad in making the code hard to change. Maybe you're confusing macro hell with old software. It applies to any codebase. It's simply a fact of software (right now). The more of it you stack the greater the burden on the programmer.

No language has moved past this. If it had it'd be replacing every piece of software in existence extremely quickly because that's where the costs of software development lies.

I do like the idea of many FP languages. They actually do minimize a lot of that stuff but for experienced programmers they usually didn't need help on that front.

>They actually do minimize a lot of that stuff
I did a poor reordering of my post here. I'm talking about the burden of knowledge.

Most of your love for C is probably based on nostalgia. C is outdated, is not deprecated. Javascript is probably the new C, as everything valuable is based on it. It can lives server side thanks to Node.js, very efficiently client side thanks to Web Assembly, and it can support native development with Electron. Thanks to this, I can make money out of an app wrote in less than a day, while you'll still be struggling implementing you generic linked list. Get real, true programmers are all dead.

>Most of your love for C is probably based on nostalgia.
You really think we're old enough for that? Even if we're 30+ we're not the programmers that moved from asm to C as our primary programming language.
>Javascript is probably the new C
bait. You don't understand this field at all if not.

>Does with proper struct design
please actually read what I posted next time
>Does with proper macro design
not a substitute, unless you want to make your code even less readable than a sepples template metaprogram
>Not that I'd advocate using C and macro systems to do all of these things if you don't have to, but the point is you CAN do them.
The point I'm making is that the language themselves doesn't contain any adequate mechanism to express them. Any attempt you make to assemble these abstractions is dogged with leaky implementation details like casting struct pointers or manually calling macros to instantiate code. In other words, they're bad abstractions because the language is too inexpressive not to leak those details.
But they're also necessary to good programs which is why you see them in C code everywhere.

Nothing wrong with function pointers in and of themselves but when every use of a "callback" always leaks a closure void* parameter it's time to start questioning just how robust your abstractions are.

>Why does C seem to be the only sane language that exists?
You can learn the syntax in less than 2 days.
It's easy to read.
It's easy to code in.
It compiles quickly.
It isn't C++.

>when every use of a "callback" always leaks a closure void* parameter
Elaborate please.

You can virtually use javascript on every platform, and it's easy as fuck to learn. And as a matter of fact, and computational power cost nothing and all the industry has made the choice of simplicity : QT5 layouts use javascript, Java is the native language for Android app, and even most big data stacks relie on Java. Next obvious step is javascript everywhere. Elitism won't bring you anywhere.

Shut the fuck up. Only meets or autists think everything should be written in C.

>Java is the native language for Android app, and even most big data stacks relie on Java. Next obvious step is javascript everywhere.
Odd comparison. Javascript is not related to java in any way, last time I checked.

>Java is the native language for Android app
And what does that have to do with Javascript?
Nothing at all. I told you you don't understand this field.
>Next obvious step is javascript everywhere.
JS and Java aren't close langauges aside from being imperative langs with some weak OO functionality. Which describes most modern imperative langs.
You might as well have pointed to C++ but because you're a brainlet you assume similarity because of the name.

Any time you get a C API that requires you to pass a function to another function, it gets a parameter of a void* and might even return one too. If it doesn't do this then it is defective and inadequately parametric. Just an example of how C's abstractions require you to constantly get your hands dirty with imlpementation details.

The popularity of Java is all about reliabity relative to heterogenous environments/ platforms. Still, Java development lifecycle is long and might be painful. Javascript has matured enough recently to be envisioned as a potential replacement, as it's even more versatile and costs less in term of HR because of its accessibility. Software is done, the industry is looking for app builders.

Oh, alright, so what you said wasn't actually true, got it. For a moment there I thought C implemented actual closures I wasn't aware of, or something.

Yeah I'm just talking about the extra parameters you always have to pass to hack around not having actual closures.

You're thinking of Fortran, my friend

>publicly flaunts ignorance
>doesn't respond to criticism
What you're really saying here is that VMs are the future. Despite this we've seen a rapid decline in VM use. Because guess what, platforms aren't as diverse anymore and the diversity that's there is things like mobile vs desktop vs game console vs embedded platform.
All of which _require_ diverse implementations on the high level. A VM doesn't solve that in the slightest. A library might (sometimes), and it's something which any language could have.

Where did you pasta that shit from Pajeet?. Or did you past english class level 2 >

>If I could have common LISP compiled to assembly
what is SBCL

Congratulations, Anonymous
You've seen the light

Attached: Jigoku.Shoujo.600.505350.jpg (457x600, 138K)

>This thread
youtube.com/watch?v=P5tFJ9umhvk

>classes are bloat
user what the fuck is wrong with you

You're right, all is about few device types nowadays. But there are very few device makers as well. And a company releasing a new platform is going to look for media and license bucks to make profit. So they are going to provide an easy as possible framework for third party to create content for their product. And guess what? The common ground of those frameworks is usually either Java or javascript. Because most of the current workforce, hence the industry, is trying to reduce the development cost. Again, computational power is not a problem anymore, so that we don't care anymore about optimization - we care about products that follow the trend and sell quickly. C is not suited for this. So yes, devices and platforms internals might relie heavily on low level languages, but most of the industry is composed of companies that build actual value on top of this.

> did you past

You can make standalone executables that just run your already-compiled code, too.
How much extra stuff stays lumped in depends on the implementation. Amusingly related to this thread, some Schemes actually generate C and compile that.

When do I get my mandatory C waifu? Does she come by mail?

tldr: you are too dumb to understand oop

>no actual arguments just name calling
Go home babby, this isnt a thread for you

>It's not bloated
But it is. Bloated *and* underspecified at the same time. How the fuck do you even do that?
>it's not cryptic
I can guarantee you don't know half the interactions of your "nonbloat, noncryptic" static, inline, restrict and volatile.
>it's you handling bytes using functions;
Humans tend to be very bad at this. Hence the endless list of bugs caused by "programmer error" in C projects.
There is exactly one use-case for C (not really C, very specific subset of it). You want formally verified system, down to binary and cheaped out on devs (by not picking Ada).
>it's hard for even you to keep up, given enough time, given a big enough project
I can also guarantee you haven't worked on anything in the millions loc.
>I've been working with just C [...] for the past six months
This much is apparent. Anyone working with C professionally knows how bad it is (some don't because they don't know there are better options).
>Why aren't you using C right now
Because i want my toy projects to work reliably and in reasonable time, not averaging 4 hours per loc.
>why are programmers today such onions boys?
You don't care that your sw is full of holes and bugs, for you it's all about *feeling* productive orwhatever.
Programmers will stay cucks until they're legally liable for damages caused by their shit.

Attached: dw4dq7xi6yk21.png (1082x1388, 816K)

just of the top of my head
>no tuples(no nameless structs don't count, you can't return them from functions)
>#include is horrible, every header imports all of it's dependices
>no parametric polymorphism, not even on types, you can't have array(T)
>macros being a thing
>bitwise precedence is messed up
>no type inference, not even the easy to implement 'auto'
>no linear types or anything similar to help manage memory

t. seething retard
Read a book nigger.

You can do it as it is by taking a reference and extracting the .begin and .end yourself. However then you wouldn't be able to provide your own iterators. See, I can grab an iterator at any two elements and pass them as a range.

You can extract subranges in other languages, too.

The horrible, dystopian pajeet future.

if that's not maki then it's shit

>Bitch, I've been programming for 12 years. C++ was my first language, if you're wondering.
Kek. I like how you think this gives you even a modicum of some kind of internet street cred. Guess what, I've been programming SINCE I was 12, with 25+ years experience, and my first language was C. Guess what, that also means jack-shit.
However, it's pretty clear you are a fucking idiot when you say things like
>Why aren't you using C right now
because if you were even remotely qualified to have an opinion on this you should be able to instantly think of like 500 obvious reasons off the top of your head.
You use the right tool for the job. C is almost never the right tool for the job in most day-to-day programming tasks.

bitch lasagna

Sure, just not C.

>not ANSI C

I've come here just to point out how shit your upscaling settings are.

what's wrong with C11
what's better about ANSI C

just use Go, it's still the same shit but not as autistic
literally there is no point in using C in current year while you can have the same performance using modern C++ that is not cancer

I am not autistic and surely do not feel like giving people access to low level parts of system architecture just to use C.