[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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


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



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