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

What is it about this language that attracts such smug retarded

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: 55
Thread images: 2

What is it about this language that attracts such smug retarded faggots?
>>
Elitists who think they are better than everyone else because their programming language is more fucking convoluted.
>>
>>61706270
>Convoluted
Don't use words you don't understand kid.
>>
>>61706295
You're the smug retarded faggot OP is referring to.
>>
Why does everyone say you should learn C before C++?
>>
>>61706239
>have toilet in house
>use it like a normal human being
>see pajeet shitting on street
>dude don't you have toilet at home?
>pajeet make online rant why everyone who use toilet is smug retarded faggot
It's like that.
>>
>>61706360

Because C++ is a more evolved C.You should learn C before any other programming language anyway.

>>61706239

Because only C/C++ are programming languages, rest are trash for koders.
>>
>>61706386
>Because C++ is a more evolved C.
Is it though?
I've been told by some that they require different programming habits, due to C++ being so different nowadays from its counterpart.
>>
>>61706386
Only Rust is a programming language, the rest a kid toys.
>>
>>61706398

yea
C + OOP = C++
You can do OOP in C too, but its way harder and takes more time.

>>61706403

Go back to /r/cuckhold
>>
>>61706417
t. pajeet

get a segfault
>>
>>61706270
C is the opposite of convoluted. The K&R book's chapter on the C standard library is only 17 pages.
>>
>>61706438
brainfuck doesn't even need a single one
>>
>>61706423

>rajesh calling someone pajeet

learn a real programming language, kode baby.
>>
>>61706451
Brainfuck is very simple the problem with Brainfuck is readability. Brainfuck defeats the purpose of programming languages because it's more unreadable than binary.
>>
>>61706417
>C + OOP = C++
Is it that simple?
>>
>>61706455
pajeets code in C/C++ because they can't fit anything more advanced like Rust in their heads

Only real men code in Rust. You're the pajeet.
>>
>>61706470
Actually it's more like:

C + OOP + RAII + Templates + function overloading + operator overloading + STL + Boost + constexpr + (soon) precompiled headers + (soon) modules = C++.

C++ is much better than C, just like Rust is much better than C++.
>>
>>61706417
I wouldn't say C++ is C with objects it's moved long past that. Much of its syntax isn't even C like. There's really no language that I'd consider C with objects.
>>
>>61706468
int main(int argc, char argv[static 1]) {
return 1[argv];
>>
>>61706492
>C++ is much better than C
It's really fucking not. C is good at what C does. C++ is fucking awful at what C does and what C++ does.
>>
>>61706516
Tryna talk shit on C but your program wouldn't even compile
> return 1[argv];
Har dee fucking har, we already know that argv[1] and 1[argv] are just syntactic sugar for *(argv+1)
>>
>>61706578
Yeah I forgot the fucking brace, but with it it's compiles just fine except that the prototype of main is non-standard. With any other function it's fine.
>>
>>61706591
>non standard
>in a discussion about C's standard library

are you retarded?
>>
insecure dumb kids who feel threatened by C programmers superior capabilities.
>>
>>61706617
The discussion was about C, you moron. Learn to read.

void foo(int array[static 17]) {}
>>
Because theyre dumb pajeets
>>
>>61706634
>c
>non standard prototype

Do you not see the problem here?
>>
>>61706652
yup, it's UB
Undefined Behaviour is perfectly valid C.

Just like casting a pointer to a different type except void *, char * or itself is undefined behaviour
>>
>>61706239
it just werks
>>
>>61706669
int main(void) {
int x;
short *y = &x; // undefined behaviour
}
>>
>>61706691
it'll just read the first 16 bytes
>>
>>61706669
>Undefined Behaviour is perfectly valid C.
UB is the definition of invalid C.
>>
>>61706714
It violates the "strict aliasing rule".
Using a union is the way you would properly do that.
>>
>>61706714
No, it's undefined. Check the fucking standard. It's perfectly valid for this program to crash.

You don't know your own language.

What if there are different padding requirements for pointers to short and pointers to int?

Also, this is undefined too:

#include <stddef.h>
int main(void) {
int x, y;
ptrdiff_t z = &x - &y; // undefined behaviour
}
>>
>>61706740
shorts and int entering into union? Not in my America
>>
>>61706724
Then there are practically no programs in valid C. Anyway, you're wrong. People specifically use undefined behavior (or implementation defined one) for speed in many programs and because they're lazy. Packed structs come to mind.

>>61706740
It's only valid to check the type that was most recently written to a union.
>>
also this is undefined although valid for all 2's complement machines (ALL OF THEM)

#include <assert.h>
int main(void) {
assert((~2) - 1 == -2);
}

C is so retarded it doesn't even assume linear memory model which is every machine since the 1960s
>>
>>61706784
>Then there are practically no programs in valid C
You're fucking stupid.
>People specifically use undefined behavior
COMPILERS use UB to speed up programs, because they are allowed to optimise based on the assumption that it never happens.
Deliberately putting UB into a program is just retarded and will lead to stupid, invalid code littered with bugs.
>Packed structs come to mind.
That's not UB. It's a C extensions, and C doesn't really say much about the alignment of types anyway.

>It's only valid to check the type that was most recently written to a union.
Only in C89. Later versions of C explicitly allow using unions to type pun.
>>
C11 threads are not implemented as of mid-2017 (because C is dead). It is practically impossible to write multi-threaded portable programs unless you resort to inefficient wrappers.
>>
>>61706858
>are not implemented
By who? There is no canonical C implementation.
If you're talking about glibc, there actually exists a patch set which is very likely to be included in the next version.
>>
>>61706753
its just an internet argument, not a death life battle bro. chill out and stop taking the internet so seriously.

compile the program, notice that it gets you the lower 2 bytes.
>>
>>61706872
glibc is the only thing that can be ported to Windows (90% of desktop marketshare), musl, uclib and dietlibc are utterly worthless (10% of marketshare) and MSVC doesn't even fully support C99 (VLAs).
>>
>>61706908
>glibc is the only thing that can be ported to Windows
What? glibc is VERY linux specific.
>>
>>61706920
Yeah, my bad. Forgot mingw is just a DLL wrapper, sorry.

Anyway, mingw ain't getting c11 threads for a long time so you might as well use embedded Linux syscalls for the same amount of portability.
>>
>>61706472
>rust
lol
>>
File: 1487715522169.png (38KB, 499x338px) Image search: [Google]
1487715522169.png
38KB, 499x338px
>>61706846
>You're fucking stupid
U showed him mang.
>>
>>61706669
>Undefined Behaviour is perfectly valid C.
>that's how /g/ looks like
>>
>>61706398
You should definitely adopt different habits, however you won't fully understand other people's C++ unless you know C.
>>
>>61707485
C is one of the easiest languages to learn to read, I don't understand why people get their panties in a bunch when they are asked to learn it.
>>
>write thing in C
>builds and executes
>copy the same into a C++ IDE
>builds and executes
>apparently they're different languages
Damn it's tough being a programmer! I'm so happy I don't have to understand why people argue about this!
>>
>>61706398
>I've been told by some that they require different programming habits
They do, but it's still possible to program C++ as "C with classes" if you want to, although that's frowned upon.

>>61706438
That's because the C standard library is very lacking compared to modern languages.

>>61707622
Just because the code is valid, doesn't mean that it is idiomatic. I can also write a valid C program that looks like I threw dogshit onto the monitor, but it doesn't mean that that's the way I should be doing it.
>>
>>61706515
>literally Objective-C or (newer syntax) Swift
>>
>>61707622
try copying something other than your home assignment from university
>>
>>61707689
>uni
But I don't go to a uni where we program. I was taught C++ in 5th grade (11 yo)
Thread posts: 55
Thread images: 2


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