[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: c--logo-icon-0.png (145 KB, 1024x1024)
145 KB PNG
>bends over backwards to be a superset of C (by including bullshit like header files and whatnot)
>isn't a superset of C
>dogshit template system that's also an embedded turing tarpit
>default initialization
>#ifdef hell
>OOP bullshit
>several compilers with mutually incompatible extensions and your codebase uses all of them
>several build systems and all of them are shitty
fuck this shit. I am so happy that it is getting replaced by rust.
>>
>>109434333
>OOP bullshit
?
>>
>>109434369
When someone says OOP is bad you can safely discard their opinion as retarded
>>
>another rust tranny filtered
>>
>>109434333
>rust
No one gives a fuck.
>>
>>109434369
it's a bad way to model and also adds overhead in practice (the latter is especially bad if your niche is as the high-performance systems language)
>>
>>109434615
so don't use OOP features then?
>>
C is the language of unix and unix is long dead, these are old fossils
>>
>>109434333
Why does your codebase use all mutually incompatible extensions from several compilers?
>>
>>109434333
C++ headers don't split declaration from implementation because of various quirks of the language, which is insane
C headers do, and are just fine
>>
>>109434333
C/ C++ are both retarded longos for header/ source duality
>>
>>109434740
part gets built on windows with msvc, another part gets built on linux with gcc, and sometimes these parts overlap.
>>
>>109434741
I found the concept of headers retarded back in the day when I was junior. I still find it retarded today. That's why I never touched these fucked up languages in my entire career in the first place even though I majored in C++.
>>
>>109434837
>msvc in 2011+15
use clang on windows, like any normal person.
clang supports most useful gcc extensions for c++. the c extension it lacks (local structs, local functions, vlas) are all in the c++ standard, so clang/gcc are pretty much interoperable.

i don't even think msvc is up to date with the standard from 10 years ago.
>>
>>109434934
headers emerged due to limitations of machines at the time. however they have proved to be useful when vendoring a library and only exposing what the client needs to know and keeping the internal logic/patents 'hidden' inside a compiled blob.

any it's been 6 years since headers have been deprecated. you can still use them, but there are much better alternatives now.
>>
>>109434615
c++ hasn't been oop since the 90's
get with the time gramp
>>
i don't know where headers touched zoomers when they were children, but it clearly left lasting scars
i never heard anyone complain about them until about 5 years ago
>>
hell, might as well delete the /usr/include directory from your computer and see how that treats you, fucking retards
>>
>>109434963
it gets very bad when you try to write 'modern' code because anything touched by constexpr/decltype(auto)/auto&&/consteval/templates has to be entirely implemented in header files, which makes them become huge globs that take forever to recompile when you modify a single line.

but that's been fixed in c++20 btw.

headers were clean in C, you exposed some api, had internal and internal headers, forward-declared structs, never defined them and basically served as documentation. in C++ it's grown to be quite ugly.
>>
>>109434971
That will do nothing. Headers are only needed at compile time, not runtime.
>>
>>109434971
>not static linking everything
ngmi
>>
>>109434390
NTA but Data Oriented Design is cache friendly, OOP isn't. Anyway C games feels way much better than C++ ones, somehow simplyier the language is, better it felt.
>>
>>109434615
>it's bad in this super particular use case so you should never use it
another retard raised by /g/
>>
>>109434986
installing packages through a package manager often requires compiling source
if you delete your includes without uninstalling the associated packages, you are in for a world of pain

>>109434995
>he has 9000 duplicates of the same library paged into memory and executables an order of magnitude larger than necessary
dynamic linking is a good thing
>>
>>109435182
memory is cheap the hardware twinks will provide however much the software bvlls want to use
>>
File: 1783808340976216.jpg (276 KB, 2556x2556)
276 KB JPG
>>109435199
>memory is cheap
>>
>>109434333
now use C++23
>>
>>109434333
Love to see zoomers actually hating templates. Back in my days (millennial) I had to resort to curb my voice because loving template was seen as virtuous and anyone voicing against it was brown or web dev.
>>
>>109435150
>Anyway C games feels way much better than C++ ones
Can you actually tell without knowing the language or engine used beforehand?
>>
>>109435274
truth be told, templates are only good for containers, and eschewing templates in favor of void* and typecasts is really not that big of deal
i can't think of a single time doing the latter has bitten me in the ass
>>
>>109434984
ok, i realize this is a C++ thread, but i was thinking of C headers when posted
i'm certainly not defending headers in C++, they've been fucked since day 1

when it comes to C, i feel a lot of hatred is driven by misunderstanding e.g. thinking all functions need forward declarations instead of just the things you want to have external linkage
>>
File: bjarne.png (165 KB, 744x698)
165 KB PNG
I am having a course with C++ inventor these weeks. What should I ask him
>inb4 take a creep pic of him during the lectures for proof, not doing that
>>
>>109435390
Campus Aarhus!
>>
>>109435390
Is sam still his favourite editor?
>>
>>109435390
>What should I ask him
what production software did you develop in the last 30 years?
>>
>>109435390
What is sum type
>>
>>109435390
>>inb4 take a creep pic of him during the lectures for proof, not doing that
you know you can just take a normal pic of you two and censor yourself, fucking weirdo.
>>
>>109435390
Mention three system languages that are neither C or C++, and one must start with an R.
>>
File: 1766591539982.png (386 KB, 1008x1984)
386 KB PNG
>>109434333
What the fuck is C++?
>>
>>109435390
btw you're retarded if you think the time and lecturer don't already give away the place.
I found your university just for fun.
>>
File: 1758673177166.png (2.12 MB, 1897x829)
2.12 MB PNG
>>109435543
Woah!!
>>
>>109435512
Kek based
>>
>>109435390
Ask him if he regrets that his legacy is nothing. That what he built is already eroding away in the digital shore. Ask him if he knows what the sistine chapel smells like.
>>
>>109435386
forward declaration is necessary for mutual recursion in c. i get that c is a language from the stone age but it's still stupid. what's especially stupid is c++ keeping this behavior.
>>
>>109434720
>he doesn't know.
>>
>>109435604
forward declaration doesn't necessarily need to be in a header
i structure my C programs in such a way as to never need forward declarations except in such cases
>>
>>109434333
C++ is utter shit. Agree. C on the other hand is the best programming language ever created crushing runners up like modula 2, pascal and basic or the z80 and x86 assembler. Don't even start me on millenial web script bollocks like java and .net or the retard conman stuff like vb and python.
>>
>>109435390
Tell him there is nothing wrong with goto and that object orientation is when coding turned into nonsensical buggy bloated piss. Tell him he spent his life using operating systems partially written by someone who thought that
>>
>>109435675
>Tell him he spent his life using operating systems partially written by someone who thought that
the nocoder is a windows user. for real.
>>
>>109435585
what is the point of lying anon?
>>
>>109435675
>oop
>c++
c++ isn't object oriented since the 90's

everyone is using data oriented or functional patterns.
>>
>>109435798
>everyone
>nobody does that
>>
File: 1777937917136241.png (231 KB, 750x843)
231 KB PNG
>>109435584
elite h4x0r
>>
>>109435812
get with the times ahh unc
>>
>>109434936
One thing I like about msvc is it produces significantly smaller binaries since its identical code folding actually works, icf is totally broken on clang.
>>
>>109435663
What about Ada?
>>
>>109434390
2pbp, and I prefer C.
But people who can't wrap their head around OOP are the same people who can't imagine a spinning Apple in their head?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.