[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / 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.png (23 KB, 360x405)
23 KB
23 KB PNG
You don't need anything more than C. C++ is blsegmentation fault (core dumped)
>>
C is dalit.
>>
I like object oriented programming.
>>
>>106449636
Same.
>>
>>106449636
Good on paper and small projects. Ass for anything else.
>>
>>106449641
Isn't it the other way around? Procedural is the way to go for small projects, but once you want to work at scale you really need encapsulation (OOP).
>>
>>106449715
>encapsulation
namespaces (not OOP)
namespaces in C is an .obj files
>>
File: bender.gif (1.85 MB, 640x480)
1.85 MB
1.85 MB GIF
>>106449636
>>
File: theshit.jpg (118 KB, 1005x1297)
118 KB
118 KB JPG
1. use only TinyC
2. patch existing codebase to compile it with TinyC
3. reject any C extensions/standards if it not supported by TinyC
-----------------------------
C++ programmer = brainlet
reasons:
1. STL/boost no any faster than python, but python actually work and don't leak memory
2. fast part of C++ is clean C and nothing more
>>
>>106449832
>STL/boost no any faster than python, but python actually work and don't leak memory
lmao most python code is c++ libs holy shit
>>
>>106449715
I've found OOP having worse scaling since if a standard inheritance is not going to do the job, it makes for a god awful process to make it work. Composition makes it better, but there is still rewrites when it comes to new features. Keep in mind, this is for pure OOP and not something that mixes code styles when needed.
>>
>>106449715
Look through any sizable oop styled codebase and it's a fucking hellscape of retarded abstractions, retarded patterns, uneeded abstract overloaded bullshit and good luck understanding the control flow through all that fuckery. Oop adherants will tell you some bullshit about real oop has never been done and proceed to change the definition of what is meant by oop every 20 seconds because for some reason they love modelling their program around some bullshit object attempting to replicate real life in code retardation - lispfags had it right 75 years ago, data and procedures that act on that data is as far as you should go.
>>
>>106448504
>no generics
>no collection classes in standard library
>no namespaces
>no modules, only header nonsense
yeah no thanks rajjeet
>>
>>106450147
>>no namespaces
>>no modules
in C is an .obj files
>>
>>106449894
>not something that mixes code styles when needed.
That's the issue. OOP peddlers tend to be rather fascistic in their approach, so every inch of the code has to conform to it, while the reality is that plain procedural as the backbone with certain features of other paradigms applied in specific places gives you the best leverage for large projects.
>>
English is much more retarded than either of those yet you had absolutely 0 issue writing your awful bait post in it.
>>
File: 0RFTmzyOudA.jpg (95 KB, 604x299)
95 KB
95 KB JPG
modern C
i see at:
https://github.com/skullchap/chadstr
and what i get:
_Generic is new keyword
https://en.cppreference.com/w/c/language/generic
but hidden polymorphism no in C style
also i hate how C macros become FP style langrage
a want PHP+C hybrid, where C compiler grant to PHP the _Generic function to get type of expression in current context
of course it is 2 pass C compiler
----------------
new keyword PHPmacro:
PHPmacro phpFuncName(args) ---translates-to---> <?php phpFuncName(args,array(types) ?>
---------------------
I NEED IN C:
1. REMOVE RULE OF PRE DEFINATION, I LIKE TO DEFFINE DATATYPES LAST
2. AUTO CREATION *.h FILES FOR EVERY *.obj AND *.lib
3. NAMESPASES (JUST FOR FUN)
ALSO MULTIPLE VARIABLES RETURN FROM "GO" CAN BE NICE
I GET:
C++
--------------
the chadstr tread:
>>81673325
>>
>>106450168
thats a binary saar
>>
>>106450173
If only we had a language that
>was designed and is used for when top performance is required
>had C preprocessor
>had complex and therefore powerful metaprogramming
>had declarative resource management
>had OOP
>had namespaces
>had plain functions that just work on their own
>had powerful operator overloading
>made trannies seethe
>asserted its superiority by calling itself C++, C but objectively better, imagine
nobody would ever complain
>>
>>106450191
the binary have inernal names and external manes
inernal names safe for name conflicts
>>
>>106450192
D comes somewhat close.
>>
Sure bro, let me just spend a couple hours implementing a heap by hand instead of using the STL, that is harder to adapt to different problems and slower than the super-optimized one the compiler devs cooked up.
>>
>>106450212
No it doesn't, C++ actually lives up to its name.
>>
>>106450173
I wonder why OOP pushers are so over the top of the entire code base complying with their principles. Not even functional autists are like this.
>>
>>106450231
I write a separate allocator on a per-problem basis, takes minutes, not hours. Even if it took hours, I work on problems that take years to solve. Stick to your Python bydloscripting, sister.
>>
>>106450192
>had complex and therefore powerful metaprogramming
Complex, yes. Powerful? No.
>>
>>106450262
They bought into the premise, which's actually quite good but doesn't scale up well at all, but you only find out about this (though they will die before admitting defeat) once you've wasted enough time trying to undo shit you didn't even know you had to plan for. Not a skill issue, just not a good idea.
>>
>>106449760
Based
>>
>>106449715
>encapsulation (oop)
demand a refund of your tuition from GATech or whoever taught you this retardation
>>
>>106450212
lol
lmao even
>>
I love c but I hate maintaining header files. I need a language that lets me write .c files with annotated functions/structs/variables to give them external visibility. Also I should be able to define everything in that file in whatever order and the compiler figures it out instead of just going top to bottom.
>>
>>106450365
So use Rust and cope with compile times.
>>
c is cool
c++ is not
>>
>>106450279
Only a LISPtard would find C++ metaprogramming not powerful enough for him, given limitations that it must in the end compile down to few, simple machine code instructions, and not 33MiB dynamic global state blob with a REPL and debugger built-in (since C code is "built-in" apparently).
Wanted code generation anyway because you're retarded? Fine, use Python to generate it.
>>
>>106450279
C++ template metaprogramming is not complex unless you're literally retarded, it's nowhere near as convoluted as haskell monoid nonsense or whatever shit other declarative languages have.
Anyone who has passed a CS degree shouldn't have any problem with it
>>
>>106450365
i have PHP script, it autocreate .h files for me
>>
>>106450683
Mind sharing?
>>
File: amd64.png (23 KB, 480x480)
23 KB
23 KB PNG
You don't need anything more than asm. C is blsegmentation fault (core dumped)
>>
I like destructors like I like my women. I don't have to ask them to leave.
>>
>>106450767
tip- use comments to point at external functions
>>
File: 1753522328558067.jpg (523 KB, 987x741)
523 KB
523 KB JPG
>>106449624
>>
>>106450772
TinyC is a memory safe language
>>
>>106450802
TinyC is an educational exercise for undergraduates
shoo, fly
>>
>>106450885
TinyC is a memory safe language
its innovation
>>
>>106451504
>memory safety is innovation
no, its training wheels when youre a beginner
red tape when youre experienced
and a lifeline if youre a mental retard
>>
>>106451525
me, literally greatest programmer even lived, still find memory safety very useful feature
>>
D is C but better in every way and it absolutely hypermogs C++ and C#.
Also it can directly compile and link with C so if you need to use a library you're covered.

D is absolutely 100% the best language you aren't using, sadly people who only get their programming opinions from youtube ecelebs won't know
>>
>>106451551
how?
the nr 1 error i get is infinite loops bc i pretty much eliminated all the rest
and given i test often, and i test my error catching mechanisms i leave nothing behind
>>
>>106450343
OOP means encapsulation. If you think otherwise you are wrong and should kill yourself promptly.
>>
>>106451769
>OOP means encapsulation
we call it "namespaces"
>>
>>106450192
Why bother with the extra abstractions? Use an LLM as the preprocessor for the C compiler.
>>
File: laughing_caprio_jesus.png (266 KB, 400x400)
266 KB
266 KB PNG
>>106451943
>Use an LLM as the preprocessor for the C compiler.
>>
half tread is AI hallucinations of a smool LM
>>
>>106451769
touch a nerve, did i? i bet you spent your whole time at college getting told how good of a school GAtech is. you guys are abject retards, without exception, in every discipline.
>>
>>106449832
>spend time implementing data structures and OOP-like abstractions in C
no, thanks
>>
>>106450802
>>106451525
Can anyone explain why we need "memory safe languages" in the age of [insert your choice of ai here] scanning your codebase for those hard-to-find code bugs that even greybeard programmers from way back when programmers actually knew how to code and understood computers would miss?
>>
>>106455014
bc ai is shit at programming
duh

its a scam
and as aicultist you took part in it. for 0 USD. like a jany but worse bc you have no power whatsoever
>>
>>106455030
>bc ai is shit at programming
you've obviously never used it, or can't code
>>
>>106455049
i obviously used it and am pretty proficient at programming
>>
>>106448504
Having spent the last 5 years coding C, I can tell you categorically, that its not very productive. C++ is horrifically terrible and no one denies it. But C is just lacking in features.
>>
>>106455102
>But C is just lacking in features.
id argue youre using it for the wrong usecase then

the right usecase for C is when the features of other languages would be redundant because youre rolling out a custom solution anyways
>>
>>106455014
>correct
>functioning
>non-trivial
pick any two
"AI" (really just an unthinking statistical model that basedfaces while producing "dis next token, den dat next token!") can produce code that works and is correct (including in terms of being bug-free), but it will be trivial
it can produce code that works and is non-trivial (for a very generous definition of non-trivial), but it will not be correct
it can produce code that is correct and non-trivial (for a very generous definition of non-trivial), but it won't work as expected
>>
>>106450191
Symbol table you fucking retard. Some symbols are exposed externally. How the fuck else do you think linking happens?
>>
>>106448504
If you need the compiler to optimize your code for you: You need to go back to India.
>>106449641
Ask me how I know you're an H1B.
>>
>>106450063
>lispfags had it write 75 years ago
I suspect you couldn't write a recursive program if your life depended on it.
>Procedures that act on data
That's 90% of all programs, retard.
>>
>>106451769
Who taught you this nonsense?
>>
>>106453605
Why do you hate GATech? Specifically I mean.
>>
>>106449832
>2. patch existing codebase to compile it with TinyC
>3. reject any C extensions/standards if it not supported by TinyC
4. submit patches to TinyC to handle the features you need
>>
>>106455405
I don't know what that is
>>
>>106456145
Not the same anon, but I think I speak for everyone when I say you should probably leave.
>>
>>106456145
why are you on this board?
>>
>>106456023
diploma mill, full of jeet profs rubber-stamping jeet students
paper mill, full of jeet profs citing their jeet friends in exchange for citations so they can scam the tenure system themselves and immigration system for their jeet students
nobody there knows fuck about shit. im tired of cleaning up after you incompetent retards at work. im tired of you incompetent retards taking up time at conferences and not being able to answer questions about your own work. for the life of me i cannot understand why that school is so highly ranked.
>>
File: 1756759295951657[1].png (323 KB, 658x612)
323 KB
323 KB PNG
>>106448504
RAII.
>>
File: pathetic-asuka.png (206 KB, 350x700)
206 KB
206 KB PNG
>>106448504
>advocates for C in favour of C++
>uses the bastardised C++ logo instead of the real C logo
>>
>>106455123
Having to roll your own dynamic array container for the billionth time really cuts down on productivity. Its just exhausting. I think C is good for writing long lived maintainable software, but its incredibly slow to write, and for any kind of exploratory coding its bad.
>>
>>106456647
I'm curious what you consider "exploratory code."
I'm also curious what you're using those billions of dynamic array containers for and why you find them so difficult.
>>
>>106456647
>your own dynamic array container for the billionth
why would you do this?
dont you re-use code? kek

>for any kind of exploratory coding its bad.
that might be a (you) problem
c is as modular and flexible as is your interfacing (in function defs, but also in how your program interacts with your data)
but dont fret, interfacing in C is hard. its easy for me but thats because i have something around 300klocs of c under my belt
>>
>>106448504
"C like C++ code" > real C.
Specially modern aberrations of nature.
You just do a C code, and when it starts to look unreadable, you add some dash of C++ on it to make it clean.

You don't do mankind horrors beyond comprehension like abusing inheirtance so much you need to look at 10 different source files to discover where in the chain the bug is.
>>
How far can "C++ is C with classes" take me? Probably losing out on a lot of power by doing this.
>>
>>106456728
Step 1: Make it readable and easy to maintain
Step 2: There's no step 2, the compiler will do the "step 2" for you.
>>
>>106448504
>You don't need anything more than C
Then use Lua for scripting and webdev.
>>
>>106456647
>Having to roll your own dynamic array container for the billionth time
usually im against using macros to simulate generics but a dynamic array is such a simple structure, it’s like 3 macros
>>
>>106450518
>Only a LISPtard would find C++ metaprogramming not powerful enough for him, given limitations that it must in the end compile down to few, simple machine code instructions,

Proof that you have no fucking clue on how Lisp macros work, pajeet.
>>
>>106448504
just do c code without core dumps
>>
>>106449636
Then stay away from critical applications.
>>
File: 1756592012415030.jpg (52 KB, 640x622)
52 KB
52 KB JPG
>>106458940
Who are critiquing those apps?
>>
>>106450231
>be me retard
>can't find STL heap in C
>decide to write my own implementation
>write a generic textbook heap
>takes me hours
>finally done with the project
>start a new project
>mfw still no STL heap in C
oop fags will do anything except reusing code.
>>
>>106451943
Because I am white and write my code with my own hands, character by character.
>>
>>106457856
They do not work, LISPniggers still haven't written their own optimizing compiler in LISP. And even ones they have written in C are garbage, because best C compiler itself is written in C++, all real compiler devs use C++. 0 exceptions.
>>
>>106459632
This is the only reasonable answer.
>>
>>106456426
I call it declarative resource management, "RAII" is a retarded name with more words that describes the less important part that I personally opted out of, I had to, because constructors have no return values and I disable exceptions because they suck. In my code, I acquire a resource before I initialize an object, because error checking necessitates it. I also call niggers niggers by the way.
>>
>>106448504
How do you write GUIs in C?
>>
>>106460865
normally
why would that be a problem?

aaaah that soiface retard fukken video on the jewtubes
mh-hmm

hes a retard
theres nothing to a gui in C
>>
>>106460865
I don't.
>>
>>106460888
Kek
>>
>>106461609
I speak and write towards humans, there's no reason to do that with machines, leave pointing with fingers to cripples who can't speak or hear you.



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