[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why is fucking everything in C "undefined behaviour?"
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 21
Thread images: 2
File: C-9.jpg (75 KB, 575x514) Image search: [Google]
C-9.jpg
75 KB, 575x514
Why is fucking everything in C "undefined behaviour?"
>>
>>52087080
because you're doing it wrong
>>
the best thing is that Cfags will still defend their shitty language
>>
>>52087080
To keep the language small an easily implementable, some things are better off being left to the implementer on a particular platform.
>>
>>52087080
pebcak
>>
File: f1rstlove.jpg (4 KB, 90x94) Image search: [Google]
f1rstlove.jpg
4 KB, 90x94
>segmentation fault
>>
>>52087251
>muh codemonkey-proof memory safety
>>
>>52087080
Because it isn't a modern language. It might made sense at the time, not anymore so use a safer alternative.

>>52087516
>le "I never had to write any reliable software" shitposter
>>
>>52087622
How does C not allow you to write reliable software? I'd say most HTTPDs i.e. the world uses are reliable.
>>
>>52087680
It's possible but extremely difficult. Even the best maintained projects written in C will always have a bunch of undiscovered easily exploited holes because it's simply beyond human ability to cover every single edge case and situation.

That said, I don't think full-blown garbage collection is necessarily the answer. Compiler-provided aid like automatic reference counting seems like a better path forward to me.
>>
>>52087850
You must be a C++ supporter then.
>>
>>52087622
>wuhh i called memalloc(INFINITE) and my pogwam crashed
>wuhh i performed an unsafe cast because i cant into typing and my pogwam crashed
>wuhh i didnt deallocate my memory and my pogwam crashed

I'm sure whatever programming language you use is analogous to your wife: Completely fucking uncontrollable and with typing looser than a Dublin whore.

In all honesty though, use C where you need performance or tight memory management, and other languages where you don't. Every language is good at one thing or another, even Javascript. :^)
>>
Good goy yes Python is best for sustainability. C should be retired
>>
>writing in C
>not writing in assembly
>>
>>52087080
Because it's designed for embedded systems and it'd be a waste of time and manpower to tell every embedded systems hardware developer that their hardware must produce these exact results when the programmer is retarded and is probably doing something completely wrong to begin with.
>>
>>52087873
No, I don't think C++ strikes the balance either. The language we need doesn't exist yet.
>>
>>52087080
cuz u ned 2 git gud
>>
>>52087622
>Because it isn't a modern language. It might made sense at the time, not anymore so use a safer alternative.
Tell that to me, embedded programmer.
Get the fuck out
>>
>>52087931
>not writing in C and then fixing shit up in assembly
>>
>>52087622

People willing to trade their freedom for safety deserve neither.
>>
>>52088184
>not using a compiler that isn't gcc and not having bugs in your output
Thread replies: 21
Thread images: 2

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.