[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]

Why doesn't C have lambda expressions or even anonymous

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: 8
Thread images: 1

File: pfrDlU2.jpg (29KB, 400x240px) Image search: [Google]
pfrDlU2.jpg
29KB, 400x240px
Why doesn't C have lambda expressions or even anonymous functions?
You have anonymous structs, unions, enums, why not functions?

Why do enumerated types have to pollute the global namespace, even if they're declared inside of a struct or function?
Oh wait, let me just make it a static type, OOPS now you can't use it anywhere!

And why wasn't array size built into the language?
The standard says nothing about how an implementation was supposed to keep track of it's heap usage, yet it expects it to know the size of a heap pointer to free or resize it.
Why couldn't this have been standardized so you could use it as a foolproof way to determine array length without resorting to stupid shit like null terminators?
>>
>>55135344
C is designed to be as lightweight and close to the metal as possible. I'm sure there are MANY small abstractions they could have used to improve it, but each one would slowly turn it into a clustered mess. You still have function callbacks and can pass them as parameters, so you can still use lambdas and anonymous functions, just with a type and name
>>
>>55135364
>just with type and name

So not anonymous functions?
>>
>>55135344
C was made by cucks who worked in the mail room of a telephone company on their downtime.
>>
>>55135387
There was no such thing as downtime at bell labs because they were never really told to do anything.
>>
>>55136553
Those lads were comphy as fuck
https://www.youtube.com/watch?v=tc4ROCJYbm0
>>
Because C wasn't based on Algol 68.
>>
>>55135364
This. Read the back cover of "The C Programming Language" bible:

>We have tried to retain the brevity of the first edition. C is not a big language, and it is not well served by a big book.
Thread posts: 8
Thread images: 1


[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.