[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
/v/ - Video Games


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1762008536802.png (15 KB, 280x280)
15 KB PNG
>70% of videogames is composed by this complicated unintuitive piece of shit language
Has anyone ever invented actual good modern language yet?
>>
>>741799816
Jon Blew it.
>>
they should switch to sanskrit best programming language nasa use make rocket
>>
>i can't "code" unless it's python
>>
>>741799816
What's unintuitive about it?
>>
>>741799816
Yeah, it's called ASM.
>>
>>741800106
the vibes
>>
C
>>
>>741799816
Most gaming programming is done through the engine which is not C++ coding in any meaningul sense even when the engine is made in C++.
What proportions of current games is actually "raw" C++?
>>
File: file.png (154 KB, 1024x1024)
154 KB PNG
>>
fuck whoever made this language
>>
>>741799816
c++ is the best language that exists
all the best games are written in it
>>
>>741799816
>Has anyone ever invented actual good modern language yet?
There's tons of choices these days, but you'll find a nitpicky issue with all of them so i won't bother
>>
go back
>>>/g/dpt
>>
>>741799816
>actual good modern language
yeah it's called click and drag in UE5. that's why modern games are so well-optimized.
>>
>the whole point of c++ is optimization
>every game releases unoptimized as shit
?????????
>>
>>741800975
>>the whole point of c++ is optimization
idk where this meme came from, but the whole point of C++ (C + 1) was just adding classes to C
>>
File: 1758536548325736.gif (3.99 MB, 498x498)
3.99 MB GIF
>>741800629
One of the worst generals across the entire website, legitimately just one retarded schizophrenic autist that rambles about "factorio being badly optimized", how great his windows registry dumper is
>he can't release it to the public because it uses trade secrets
and how he thinks all autists should be turned into cattle fodder
>claims he isn't an autist, but an ""adhdist""
plus the retards that egg him and his delusions on.

LLMs have amplified the annoyance of schizophrenics across the globe by a million fold.
>>
Calling C++ "unintuitive" just shows how bad you are at coding. Kill all LLMs, they just enable retardation instead of encourage learning.
>>
File: TRANNIES BTFO.png (1.11 MB, 800x1300)
1.11 MB PNG
>another c++ hate thread
Why do trannies hate it so much?
>>
>>741801270
>Calling C++ "unintuitive"
anon, senior C++ committee members have called it that for years (in nicer terms).
Herb Sutter made an entire front-end language for C++ because it's so bad lol
https://github.com/hsutter/cppfront
>>
>>741799816
>covert rust thread
FUCK YOU TRANNY OP
>>
>>741801034
It's disingenuous to claim that 2026 C++ is "C with classes". That ship sailed in the mid 1990s.
>>
File: c.png (19 KB, 345x280)
19 KB PNG
>>741801034
>>
>>741800106
Zoomers are completely filtered by the concepts of pointers, and managing yourself the memory.
>>
>>741801034
He means the whole point of using it in today's world.
>>
>>741801310
You have to actually put some work to master it.
>>
Just going to throw out that every java based game ive played has been soul.
Minecraft
Spiral knights
Uhhh
Sulfur nimbus?

Make more java based games.
>>
>>741802168
>Make more java based games.
While you can actually build great games in Java, the language itself doesn't lend itself really well to it. GC can be a huge hustle if you are not careful for example.
But if people here want to do some game dev with Java, libgdx is a good starting point. It's from the same guy who did Pi.
>>
>>741802168
spiral knights was made in java huh? no way fuck dealing with boiler classes
>>
>>741800354
Rust is a good language but shit (and pointless) for video games.
>>
>>741799816
I propose the following expression:

E = mc^2 + C++ + AI
>>
>>741802168
For every runescape 2 and minecraft you had 10,000 shovelware titles
>>
>>741801310
literally rent free
>>
>>741799816
Sure, python and Julia (nu python)
>>
Python is complete fucking dog shit and whoever decided whitespace and indentations should count as syntax needs to be drug out into the street and shot
>>
>>741802768
whitespace is kino, it's just unfortunate Python had to be the posterboy for it.
>>
>>741802057
if I compiled this with clang, would it still call me a faggot?
>>
>>741802947
>whitespace is kino
Nerdlanguage. The actual benefit it has you ahev to think before you do. Whitespace devs are all decent.
>>
File: 1777166780685265.png (276 KB, 432x324)
276 KB PNG
>>
>>741800740
>yeah it's called click and drag in UE5
They're actually removing that option in UE6. No more blueprint template drag&drop wiring. It's going bye-bye.
>>
>>741803221
I had to do a biography of a famous person of my choosing for a class project once, and I chose Bjarne. I really don't remember much, but I used this image of him for the project. I also remember being surprised and a little bit upset that he was Norwegian. In my childlike innocence, I had assumed the world would not be so vulgar as to have produced the premier video game programming language from the mind of a foreigner.
>>
>>741799816
>Has anyone ever invented actual good modern language yet?
Yeah it’s called C
>>
>>741802768
>force coder to format their code
>they hate it
Let me guess, you love ;
>>
>>741802560
I dont remmeber any. Unless you count early mobile games. Pretty sure all the nokia phone games ran on java mobile.
>>
>>741799816
Unironically? TypeScript. At least as far as how its type system works.
It's an absolute treat.

I'm not going to make any excuses for its runtime environment though- ofcourse it's not a good fit for high-performance scenarios like the backbone of a rendering engine.

Personally, I'd love to have seen the TS type system at work with a faster runtime like C#. With ahead-of-time compile-to-native and assembly trimming features, C# itself is actually pretty fast nowadays. Very near to suitable performance characteristics to actually start using it for things like core game logic without really having to constantly be mindful of wringing every bit of performance from it.

If nothing else though - I'd hope someone puts a rusty knife in Lua's back already and the tetanus kills it.
Piece of shit language.
>>
>>741800341
Unreal has C++ bindings natively
>>
>>741803678
>force coder to format their code
This is unironically a bad thing. There are many different ways to format code and there are many cases where it's ideal to go against standard formatting for visual clarity. Whitespace is not syntax and never should be syntax, the core concept is completely retarded
>>
>>741803860
you'll like Roc
It's basically Elm (same kind of haskell-like type system), but for the desktop.
https://roc-lang.org/
>>
>>741802065
>managing yourself the memory
link your youtube tutorial
>>
almost no games are coded in C++ except for autistic outliers like Animal Well. C++ should have been deprecated years ago but it won't happen until china develops chips with their own native code & compiler. can't wait honestly. hopefully in <5 years.
>>
>>741800354
https://loglog.games/blog/leaving-rust-gamedev/
>>
File: clang.png (17 KB, 730x147)
17 KB PNG
>>741803110
>>
>>741803563
He's Danish
>>
>>741804018
as someone who has spent probably 10 hours following online tutorials on coding across my whole life, i concur
>>
>>741799816
Being hard IS the point. It filters out all the idiots that have no business being in game development.
>>
>>741804253
The game engines that pretty much every game runs on these days were nearly all written in C++.
>>
>>741804319
This must be why I failed that class.
>>
>>741804318
guess I'll go choke on some cocks now
>>
Most of the alternatives doesn't offer a good optimisation and workflow while also being Object Oriented (Most code monkey devs fail at anything that is procedural or god forbid functional).
>>
File: 1775124794230.png (108 KB, 1017x441)
108 KB PNG
C++ is, dare I say it, kino.
>>
>>741804318
Post-increment semantics strike again.
Actually - it's weirdly accurate that the language is C++ and not ++C in that sense.
Because for the first decade or so of C++'s existence, the language was total ass and the best way to use it was just not to -- only use the more rigidly standardized features of C-98 instead.
The good stuff that actually made it an increment over C only came years after the fact.
>>
>>741803860
>TypeScript
you mean a gay linter for javascript?
>>
>>741804397
yes, but most developers are not actually writing c++ code to govern the gameplay system behavior. i think. idk lol
>>
>>741805006
why not, C++ isn't particularly hard, nor is it particularly time consuming which is kind of the point of its existence over C
>>
>>741804302
AI solves all of those issues
>>
>>741802065
It's 2026. I'm glad that we finally can type into a machine and say "do this computer magic for me" instead of having to worry about all that bullshit. Absurd. Just absolutely absurd that we had to put up with that crap for literal decades.
>>
>>741805463
Yeah, but now we replace that with niggerlicious code that is supreme voodoo hoodoo with frameworks and libraries obfuscating everything and making long term legacy nearly fucking impossible.
>>
>>741802168
Songs of Syx, Starsector, Mindustry.
>>
>>741805463
>@grok one-shot this random crash for me
>@grok please one-shot that random crash, and then fix the new bug
>@grok delete the buggy system and redo it, no mistakes
>@grok revert to my backup branch
>[...]
>>
>>741805138
Because the engines use different languages for their scripting.
>>
File: 1774558681958.png (394 KB, 758x616)
394 KB PNG
>>741805138
>C++ isn't particularly hard
For someone new to coding it absolutely is.
>>
File: sudoku.png (82 KB, 1183x1188)
82 KB PNG
I'm glad they still taught C++ in the Uni in the mandatory, introductory CS courses for non-majors. After I graduated they all switched off to Python. Made me appreciate and understand what's actually happening under the hood.
Funny thing is, in my actual line of work, I mostly use Python and VBA for automating tasks. I only use C++ for hobby projects, like a Sudoku solver I tried making a few years back.
>>
>>741805934
Not really. Explain to me what makes cpp harder than python for beginners? If anything I think it’s the perfect language to start off with. Better than C
>>
File: 1779349811624007.gif (2.9 MB, 540x526)
2.9 MB GIF
>>741801310
Based
>>
>>741806050
I feel like the image you're replying to makes it pretty clear, newbies can't wrap their heads around pointers and when you do something wrong with them the error messages often only make sense if you really understand pointers.
>>
>>741802057
>C++ doesn't equal C + 1
>Wha da fuk?
>Learn about Pre-Increment and Post-Increment
>Try ++C in my version
>It still doesn't change the outcome
>It's actually because ++C set C to 2 and then C+1 makes it 3 and C++ sets C to 2 again but will be compared as 1 and C+1 will be 3
I can't believe I even THOUGHT I was somewhat good at programming. :(
>>
>>741805463
AI will not save you from mishandling memory.
>>
>>741806245
the actual thing it does under the hood depends on the compiler because it's undefined behavior
>>
>>741801310
C++ is merit based.
>>
File: 1751974070534964.png (10 KB, 576x576)
10 KB PNG
>>741806323
Oh fuck, I really don't know my shit.
>>
>>741802057
>printf
You’re the faggot.
>>
>>741806482
If you're still undergrad it's fine.
>>
90% of the problems with C++ is that there is no standard library for the most common things and setting up third party libraries is just too complicated for it's own good
the other 10% is them not getting rid of shit and just piling things on for 40 fucking years
>>
>>741806050
In python, if you want variable a to hold number 10, you just do a = 10, no strings attached.
In C++, you have to think about types. Signed, unsigned, floating point, number of bits in variable, possible implicit conversion errors, overflows, alignment, structure padding. Then you have to think where to store it, there's 3 major storage types each with its own ways to shoot yourself in the foot.
>>
>>741799816
Is it that bad? I took a few C++ classes in college and found it pretty intuitive but I have zero programming knowledge.
>>
>>741806874
`auto` has meant type inference/deduction since c++11
>>
>>741806795
>there is no standard library for the most common things
There's one thing people usually complain about, and that's the lack string splitting. Which makes sense in C++, you have to do multiple dynamic allocations to create and return a new container of strings, which is completely retarded since you could just process string in-place with a pair of iterators.
That's a price of a fast language, some basic operations that you don't have to think about in slower language suddenly take noticeable time.
>>
>let programmers manage memory themselves
>99% don't understand it
>give them a garbage collector
>99% of devs unable to mitigate gc stutters
>invent memory ownership & borrowing
>99% of devs too retarded to comprehend it
Language designers can't win, because their customers are retarded
>>
>>741800354
Rust is unironically really good for gamedev
>>
>>741807263
just use Boost's library and stop complaining. I hate faggots who complain about the std, when they could either roll their own or use the hundreds of other libraries out there. Complaining for the sake of it.
>>
>>741807454
Do you consciously manage your memories?
>>
>>741802168
I made an online automated tcg sim in javafx
unity and webdev sloppers can suck my dick
>>
>>741804241
literally just have the same amount of deletes as news you dumb faggot it's not rocket science
>>
nigga if youre too stupid to understand C++, you should go back to high school
>>
>>741807828
pls read
>>
>>741807570
>i hate people complaining that a programming language's standard library is unusable
>>
>>741806643
I am the one who puts dick in my mouth
>>
>>741807454
And then you propose
>gc by default and then turn off the GC when it's really needed
and devs freak out and act like it's completely impossible.
Programmers truly are just cattle you have to herd, which is why Rust unfortunately won, because it forces its users into a paradigm with little flexibility (which is what programmers actually want).
Same with Go.
Turns out, giving programmers freedom is an anti-feature.
>>
>>741808045
>python has thousands of libraries
>java
>c#

>but C++ has them, and suddenly it's not a solution

Fuck off.
>>
>>741808260
This isn't an apt comparison.
Nobody goes to Python for performance.
People go to C++ for "perceived" performance, and then they find out
>Whoops 90% of the std is fucking trash, and senior C++ devs roll their own ecosystem
>>
>>741808351
I'm sorry that you're retarded.

https://www.boost.org/
>>
>>741808390
>unironic boost shilling
man it really feels like 2010
>>
>>741808448
wow you mean people figured out the solution to the problem that doesnt exist over ten years ago?!?!

owwwwwwwowww
>>
>>741807570
>2026
>boost
ishiggidiggi
>>
>>741808207
100%
This is also why lisp failed
Actually I'm keeping an eye on "Loon", which is a lisp using Rust's memory ownership, only streamlined with inference so you don't have to deal with lifetime annotations and shit (on top of full type inference)
Unfortunately the latest update broke the language playground on the site lol
>>
>>741808207
>Turns out, giving programmers freedom is an anti-feature.
It kinda is when you need to manage an enterprise.
>>
>>741808207
>rust won

HAHAHAHA
>>
>>741808207
Arenas are the 21st century memory tech grandpa.
>>
File: 1765417170463938.png (218 KB, 603x324)
218 KB PNG
>>741803221
>>
>>741808729
What other language has gotten so many legacy code-bases to completely port?
I don't even like rust, affine types are a dead-end. But it objectively is the first non-C family lang that's making a real dent. And I think a HUGE aspect of that, is actually in restricting programmers, which isn't talked about.
>>
>>741808937
HAHAHAHAAH
>>
>>741807570
I wasn't complaining doe, just giving anon an example of why perceivably simple solution is not a good one. Using sepples for trivial scripts is retarded, and in a real project you'll have to roll many utility functions manually anyway.
>>
>>741809190
>Using sepples for trivial scripts is retarded
why
>>
>>741799816
fucking filtered KEK go back to python
>>
>>741809308
python's written in C kek so they cant escape it
>>
I will code my games in ren'py.
>>
>>741800354
I'm using it for the server side of my game project and it's legitimately a joy to use compared to the cancer that is C++.
I'm still using C and C++ on the client side lol
>>
>>741810393
>server side
Stick your cock in a toaster
>>
>>741806874
Those are all important concepts that makes you a better programmer though.
>>
>>741800106
I hate header files. It's so outdated. It feels like every piece of code needs to be written twice. I'm writing some code in my .cpp file, try to compile, and uh oh I forgot to update the header! What a pain. They don't get enough hate. It also makes trying to decipher someone else's project a headache because some code is divided between header and cpp files with the same name.

And I hate (c)make files and managing my own libraries and directories and flags. C# and python have actual functioning package managers.
>>
>>741810451
Rude. The server binaries are included with the client.
>>
>>741799816
nah, every attempt has been even worse
>>
>>741802065
By the time zoomers got to school Sun moneyhatted all the schools into teaching Java first
>>
>>741810543
the fact you dont understand headers means youre another idiot filtered
>>
>>741810543
The funny part is C was invented AFTER modules were invented, and still decided to not use them because of UNIX brainrot
>>
>>741810847
Hating them means I don't understand them??? Weird attack but ok. I get that C interprets code in sequence so it needs headers for declarations. It's not hard to understand. I just think multipass compilation in newer languages is better.
>>
File: rope.png (63 KB, 498x489)
63 KB PNG
>>741811289
>Weird attack but ok.
>>
>>741799816
I hated it in school. I seriously thought I would rope if I had to do that for a job. thankfully AI can do the annoying parts now
>>
>>741811520
but umm isn't Al bad?
>>
>>741802065
smart pointers exist
>>
>>741811376
What are you being this hostile for?
>>
>>741811289
it uses headers for another reason, faggot, too
>>
>>741811762
congrats anon, you just implemented your first ad-hoc GC (a true mark of any C++ dev!)
>>
>>741799816
i hate c++- intensely
i won't respect anyone that doesn't understand it but i won't like anyone that uses it. fuck c++
>>
>>741812010
>fuck trump and fuck straights! I love being a tranny!
>>
>>741811923
oh really, would you show me the part of smart pointers that does garbage collection pass?
>>
>>741812413
what happens with smart pointers when they go out of scope?
>>
>>741812413
https://www.learncpp.com/cpp-tutorial/introduction-to-smart-pointers-move-semantics/
>>
>>741812368
the fuck it has to do with muricans?
i just don't like c++
had to learn it and use it but i just don't like it
>>
>>741812580
Code generated by compiler is being called at a certain point of program execution. Unlike garbage collector, that does tree traversal on a timer. You don't understand what garbage collection, as a concept, is.
>>
>>741813147
Garbage Collection as a concept, is literally just automatic memory management.
Which is what Smart Pointers are. The fact that you're tediously trying to talk around this is sad. But this is the reality of C++ programmers...
They will bemoan and shit shit about garbage collection, but with any sufficiently advanced program they write, they will inevitably reimplement their own ad-hoc GC
>>
>>741813358
talk shit about*
>>
File: file.png (144 KB, 1876x560)
144 KB PNG
>>741805463
Slop posts deserve slop replies.
>>
>>741813358
Smart pointer are for noobs, the new old thing is arena allocators.
>>
>>741813762
Yeah, it's just said how incoherent programmers can be.
Ultimately, arenas end up just serving the same purpose as RAII GCs
Programmers just want good garbage collection, but can't be honest about that fact.
>>
>>741800975
you still have to know what code to write
>>
>>741806985
>Is it that bad?
sort of
if you're working in quant, gamedev, or embedded systems then it's probably your bread and butter
if you're trying to write microservices or CRUD shit then it very quickly enters oh shit nigger what are you doing territory
>>
>>741812612
https://en.wiktionary.org/wiki/deterministic
>>
>>741800306
7th post best post
>>
>>741799816
odin, jai, zig

I'm doing fine with c11 though
>>
zig, d
>>
>>741813919
RAII makes a rats nest of heap allocations

arenas free everything by setting a counter to 0
>>
>>741806985
C++ has problems once you start to encounter edge cases and are forced to think about how all the new features really work. Then you reflexively blink having briefly glimpsed the gaping maw of infinity and seeing your place within it, impaled upon an elder shrike's trophy rack while you spin looms of nested templates inheriting from multiple other nested templates exploiting substitution failures and the subtleties between auto and decltype.
>>
File: 1778759593286.jpg (164 KB, 834x990)
164 KB JPG
>>741813358
>Garbage Collection as a concept, is literally just automatic memory management.
you're a clueless retard, here, eat some slop for clueless retards
>>
File: file.png (10 KB, 163x61)
10 KB PNG
>>741815279
oh the irony.
Notice how your friend says they BOTH FREE the memory for you, automatically.
>>
>>741815073
RAII and allocation strategy are orthogonal concepts, you can and should use RAII with arenas
>>
why do people endlessly argue over programming languages like this? just make a game with whatever works, there is no benefit in overcomplicating this
>>
>saar I won't give up izzat that easily
oh shit, it's a brownoid
>>
>>741815575
nodev mindset
>>
>>741815575
unironically this just make your game in unity faggots
>>
>>741799816
>Has anyone ever invented actual good modern language yet?
Yes. English. Just explain to the agent what you want the function to do and it will write it.
>>
>>741815565
>you can and should use RAII with arenas
i don't want to touch RAII with a 10 foot pole. I don't need constructors and destructors obscuring control flow, and arenas have no per object deallocation strategy so it nullifies the main point of using RAII to begin with.
>>
>constructors and destructors obscuring control flow
imagine the hand
>>
>>741802768
This this this. It's whitespace, it is, by definition, supposed to not affect the program.
>>
worshiping RAII is actually jeet behavior anon.
>>
C# is the perfect language except people can steal your source code easily
>>
File: dog.jpg (30 KB, 568x520)
30 KB JPG
>>741815424
free also frees memory for you, so it's literally the same thing as garbage collection
>>
Qualities of the languages themselves aside. Why is that the C ecosystem is still the absolute wild west while python is this beautifully organised system. It's always obvious where I can find what, how to set up environments, what version to use and what not.
>>
>>741816186
free is a manual call the programmer has to write or insert.
And then that will inevitably lead to, as i said, implementing your own GC
>>
>>741816179
Anyone can steal your "source code" if they're autistic enough.
>>
>>741816278
}
>>
>>741816269
>python is this beautifully organised system
@grok how many package managers does python have?
>>
>>741816269
because people who use C know that generalized systems are always slower and worse than doing the minimal work required to solve the problem while pythoniggers want to just slam giant libraries together to make something quickly that runs poorly
>>
>>741816269
>Why is that the C ecosystem is still the absolute wild west
You know, a lot of that has to do with the fact corporations don't like sharing their tools/work and neither do the old men who produce it.
But adversely its going to result in that being one of the few valid ecosystems left since they didn't provide enough good training materials for AI.
>>
>>741816389
not enough
>>
>>741816269
>Why is that the C ecosystem is still the absolute wild west
C ecosystem is on Linux, the system itself if your IDE, documentation and package manager.
>>
any python users here ever used the Mimo app before?
>>
>>741803860
except typescript has the retarded idea of treating two different classes as a same class as long as they have identical attributes. So a variable of type A can be an instance of type B and vice-versa.
Why? Because it all compiles to javascript so all the typing is just whack.
>>
>>741799816
I've only use C# because Unity & Godot use it, how does it stack up compared to the good languages?
>>
>>741810543
>>741810926
C++ has modules now though.
>>
>>741810543
this, fuck header files, twice the noise with zero benefit

>>741812580
they are dropped immediately? Explain to me how that's the same as employing a software-wide pool of dead pointers and dropping them all at once
>>
>>741800106
Everything
>an rvalue reference type is not an rvalue, so you can't pass an rvale reference to bind to an rvalue reference, you need to cast your rvalue reference to an rvalue with move to bind it an rvalue reference
>an rvalue reference to type Foo is Foo&&, unless Foo is a cv-unqualified type template parameter, or auto, then then it's a forwarding reference, which preserve value category, but not really, the variables of forwarding reference have their value category preserved, but to properly pass them preserving said preservation you need to forward it
>decltype(auto) exists because auto is cvref-qualified (except when it isn't)
>const, constexpr, consteval, constinit
>syntax is ambigious, foo.bar<baz>() may fail to resolve baz as template, forcing you into foo.template bar<baz>()
>template template parameters
Shit like
https://www.cppstories.com/2019/02/2lines3featuresoverload.html/

As a sepples expert this is literally the worst designed language in existence. And it's still getting worse, with no way to improve. Best you can hope for is shit like copyable_function whicch will be used by the 2k people in the world that know it, while regular function remains as a landmine for anyone less knowledgeable forever
>>
>>741818229
too fucking late
>>
>>741819069
no?
you can just go and use it.
>>
>>741799816
>complicated unintuitive piece of shit language
well done self-reporting your 85 IQ
>>
>>741811837
because he doesn’t actually know anything and is pretending he does
>>
C++ is fine, the problem is the flood of people with no interest in or aptitude for coding who 'learned to code' via some gay bootcamp that teaches javascript.
>>
>>741799816
>Nooooo where is my scripting languageeeeeee
Kys
>>
>>741807047
`auto` has like 20 meanings at this point
>>
>>741807454
The difficult parts of C++ are not managing memory, unless it's coroutines
>>
>>741811837
>>741819298
samefag
>>
>>741819027
I've been using c++ for like 5 years and I have no idea about anything you just said. :(

I avoid stuff like templates, decltype, virtual, etc. Shit is scary and I don't think I ever need them.
>>
File: IMG_1151.gif (954 KB, 480x364)
954 KB GIF
>>741802528
What?!
>>
>>741799816
you just know when it's a zoomie that got filtered out of his first CS year
>>
>>741800975
>>741802118
optimization itself has little to do with whatever language you use
>>
>>741819554
Zoomers want to program on their phone.
>>
>>741802057
>int main
>no return 0
performative troon award
>>
>>741819623
Not really true. Moving from an interpreted toy language to a real compiled language is probably the single biggest speed up right off the bat. Getting rid of stuff like C#'s retarded garbage collection is a very big gain for a lot less effort than going in and hand tuning assembly.
>>
>>741817228
>first year CS bab finds out about duck typing
cute
>>
>>741805006
>>741804253
it really ponders the mind where do jeets even get these retarded takes from
>>
>>741819027
The largest landmine of std::function is the fact that it can allocate and has mandatory virtual dispatch (i.e. it's a great shortcut to strategy pattern, but not a generic tool some people think it is). And copyable_function seems to be largely the same, addressing some corner cases.
>>
>>741805934
to be fair error messages have improved a lot
and newbies shouldn't really have to delve into the STL or writing templates early on anyway
>>
>>741819498
>I avoid virtual
Templates I can sort of understand (but not really), but virtual too? Your amount of code duplication must be ridiculous.
>>
>>741805463
>pointers and memory
>bullshit
this is the same mentality that leads into jeets dominating the industry and the enshittification of software and videogames overall
>>
>>741806795
>>setting up third party libraries is just too complicated for it's own good
>include header
>link library object code to your binary
??? how is that complicated?
in some cases only an include is enough
>>
https://youtu.be/RHwVqbvxCxM

Good information for some of the shitters here from one of the greats
>>
>>741813981
a tool is meant for specific jobs
you should really reconsider your life choices if you end up trying to write CRUD/webslop in C++
>>
>>741819950
The landmine of function is that it breaks const correctness by allowing you to call non-const operator() of the underlying callable via a const std::function
>>
>>741808207
>which is why Rust unfortunately won
where/when?
>b-b-b-but muh linux kernel!
only support for rust modules was added yet not a single non-demo rust module has been written
The companies that switched to rust are switching back. Rust job listing are going down. So tell me, where exactly did rust win?
>>
>>741810543
>waah waah I can't tell definition vs declaration apart!!!
CS year 0.5 tier post
>>
>>741815575
it's almost a side hustle for nodevs, larpers and CS students alike. Arguing about irrelevant shit they dont have a clue about as if they were compiler developers (or straight up just copy pasting from Claude/GPT).
the ones that actually know shit are busy writing code
>>
>>741816269
>>Why is that the C ecosystem is still the absolute wild west
>one of the most portable, simple and well standarized languages is the wild west
???
>>
>>741815575
>>741820551
https://youtu.be/q2sJhLYo4lM
>>
>>741819027
based
and don't even get me started into move semantics
>>
>>741810543
>I'm writing some code in my .cpp file, try to compile, and uh oh I forgot to update the header!
How do you forget to write your header?
It's extra bookkeeping, yes, but it's so much cleaner when it comes to understanding existing code instead of having a 1,500 line cpp file.
>It also makes trying to decipher someone else's project a headache
LMAO
>>
File: 1781489307990818.gif (2.46 MB, 225x225)
2.46 MB GIF
>>741819974
Maybe he's just doing CRTP
>>
>>741820442
That's not what my post said at all. Weird how you're still trying to indicate that I don't understand how headers work. I don't get why you are defending headers so much when other languages don't need them and compile even faster.
>>
Guys, is there a way to learn to game dev, like with Unity, without actually having to learn it? Like, type what I want to happen and it just does it for me?
>>
>>741820913
uh dude? c++ DOESNT need headers.
it hasn't needed headers for years.
>>
>>741819498
>virtual
To this day I cannot see the point of abstract classes.
"Finish my homework for me"
>>
>>741820959
give it 5 years
>>
>>741820709
Move semantics are easy, as long as you understand that std::move doesn't move shit, only casts to && for the sake of function overload selection.
>>
>>741820759
As someone who has worked with a project where the headers didn't help me understand the code (much) at all, how should a header be structured in order to keep things readable?

if I use newer module features is there something similar I can do?
>>
>>741799816
C++ is great
with great power comes great responsibility
if you want the tools to make shit good, you need to have the knowledge to not absolutely fuck your shit up, c++ trusts that you will figure it out or die in a burning wreck, and that is no ones problem but the ones who can't get their shit together.
no performant language will ever have the kind of retarded shit you desire, because the inability to do the weird jank shit is why you cannot make it perform to its highest capabilities
>>
>>741819761
Anon, is it really optimization when you port your entire codebase to another language? That's like saying, "I'll make my car faster by buying a new one". Optimization implies that you are making a specific program implementation faster. It is not really the same implementation once you port it to another language. From that other language's compiler and standard library to whatever other libs you might use, the way the program works is no longer the same even if the logic you wrote is. It works under different assumptions now.
Also, you seem to be under the misconception that optimization is just anything that makes the binary run faster. Optimization is not all about speed.
>>
>>741799816
Rust is fun
>>
>>741821121
check out SDL headers, niggas write the documentation novellas there
>>
>>741821284
>is it really optimization when you port your entire codebase to another language
Yes. Porting a game from C# to C++, even poorly written C++, is an enormous performance gain.
>>
>>741820913
>you see I KNOW what headers are! I don't know why you THINK I dont know what headers are! I REALLY REALLY know what headers are!
note: he did NOT understand what headers are or why they work the way they work
>>
>>741821284
Note that previous anon was speaking specifically about "Moving from an interpreted toy language to a real compiled language" - which DOES bring speed benefits to your game, by several orders of magnitude.
>>
>>741806874
>people think type safety makes its harder to program and develop software
I don't understand how someone could ever hold that opinion
>>
>>741821121
>how should a header be structured in order to keep things readable?
I'd probably ask what you, or someone else, is doing to make a header file unreadable.
Meaningful names for variables and methods should get you halfway there. Comments can help bridge the remaining gap in complex files (it would be nice if all functions were atomised and clear but we all know that isn't strictly possible, especially working to a deadline, aka sprint) and I can't remember if something like Visual Studio lets you read comments when hovering over the function in the cpp.

If at any point your code is unreadable, in any language, that's actually a "You" problem. If it's someone else's code, well, that is also a "You" problem in that you can't tell him to fix his shit because he'll blow a gasket and say "But single line ? = : blah if statement variable assignments are easy to understand!!!"
>>
>>741819974
He is just writing performant code. Not like C++ devs care about that.
>>
>>741821475
My reasoning for disliking them is that it's repetitive, adds more files to manage, and it's slower to compile. What about that do you disagree with?
>>
>>741821082
Actually, it doesn't just cast, it also changes the value category (because it's a function and you take a return from it), if `x` evaluates to lvalue of type rvalue reference `std::move(x)` evaluates to an rvalue of type rvalue reference
>>
>>741805463
And this shit is why modern browsers take up 12 niggabytes of memory and google sheets slows to a crawl if you try to do basic operations a local copy of office on windows 98 would have crunched in a fraction of a second.
>>
>>741821370
Moving the entire implementation to another language doesn't count as optimization.

>>741821370
>>741821525
Whether porting your program to another makes it faster or not doesn't count as an optimization. You can only optimize a specific implementation of your program. Rewriting your program in a different lang = different implementation.
You also seem to be under the misconception that everything that makes your run program faster is an optimization
does running my program in a faster CPU count as an optimization to you?
it's not just about speed either, you can also optimize for memory, storage, etc
>>
>>741821859
>it's slower to compile
quite the opposite actually
>>
>>741821330
>>741821617
this is an open source project for a top down, tilebased game that is light on graphics and heavy on autism and descriptions.
mostly C++.
most of it is undocumented and I had about 10 different systems that should have been 1 system doing slightly different things for the same overall concept I needed to dig into and straighten out.
All in the upper layer of an ascii game to make items and data types move around and get stored in the games "world" properly.
Think of it as overarching code for how all "items" in a game can be interacted with and used. (without getting into storage of items within items)

Most of these item actions (ranging from as complicated as a whistle that can only be activated to be blown, or a camera that is meant to take scan a section of the game world and convert that to a "photo" that is actually just a long string describing every item, creature, and structure within the photo, while avoiding describing LITERALLY every item via "summarizing" code) are simply declared in the header with nothing but the minimum needed to make the code compile.

the camera I mentioned? I didn't describe all of what it did but this is all you see in the header:
>std::optional<int> camera( Character *, item *, const tripoint_bub_ms & );

This project does have doxygen but almost nobody bothered to use it and I never learned to use it either.
>>
>>741821932
anon, all major browsers are written in either C++ or Rust. Browsers are almost as complex as operating systems.
The actual problem is just the abomination that is javascript, the absurdity of the modern web and browser sandboxing.
>>
>>741822023
nta but how would I structure headers to allow for efficient compile times?
>>
>>741821890
fair enough
>>
>>741819498
What? You really never had a need for a type/concept that evaluates a binary predicate type over the pairs from the cartesian product of two sets of types?
>>
>>741822219
minimize includes, use forward declarations as much as you can, define everything you can in anonymous namespaces in implementation files
>>
>>741822219
not sure if it is even worth it today but you could look into binary headers
>>
>>741822065
>headers are bad
>oops I meant headers in MY PROJECT are bad
this is literally a (you) issue
>>
>>741801310
So learn another language? It's not like you have to spend 20 years masteringu the thousandu forudu bureido to do anything meaningful
>>
>>741822491
I aint the dude bitching about headers.
I am asking for info on my own shit.
right here vvvv
>>741821121
I want to know that if I tinker with this shit deeply I aint fucking shit up for the people coming after me.
>>
>>741820759
>it's so much cleaner when it comes to understanding existing code instead of having a 1,500 line cpp file
Headers just add more lines to your project though. Also not everyone uses headers as cleanly as you. Sometimes they put entire definitions in them. And most of the time it's like looking for a class that's been split into 2 files instead of 1. And you wouldn't even know at a glance if a .cpp file has a corresponding header unless you compare both the src and include directories. With C# I don't have those issues.

>instead of having a 1,500 line cpp file
I don't like how you're implying that without headers the only option would be single cpp files. I'm comparing my experiences to newer languages with modules and stuff. And yes I know c++ has modules recently but it's not that helpful when lots of useful older libraries still use headers.
>>
>>741820851
>I avoid stuff like templates
????
>>
>>741822568
to be fair the Rust borrow checker is yet another thousand folded blade you have to spend a while mastering and dilating
>>
>>741822610
read API Design for C++ 2nd Edition
>>
>>741822826
It's got two rules
>borrow can't outlive thething borrowed
>either 1 mutable borrow xor many immutable ones
shrimple as
>>
>>741822065
>this is an open source
I honestly don't have to read any further. I did, because it'd be rude not to.
I understand completely. My condolences. There's nothing you can do to fix it or make it better.

I used to contribute to a SS13 project, and despite the language intentionally being for babies, autism prevailed and everything was overcomplicated in both code and game (simulation) design, and unmaintainable.
>>
>>741799816
Are you Indian?
>>
>>741822219
Just use -O0.
>>
>>741800975
Blame the programmers
>>
>>741817536
Honestly, it doesn't matter. The only thing that matters is making something. You will notice that people who argue over languages and engines have never actually made anything; thus, their insights are worthless.
>>
>>741800975
Do blueprints get compiled down to C?
>>
>>741823214
As it is the autism flared and the lead guy went nuts and started ripping out anything complicated and janky (and wasnt allowing contributions like mine in the first place.
I am already in a situation where I forked my own code for my own enjoyment lol.
But if I pass it down I intend for it to be at least more readable where I touched it.

>>741822856
alright I will check it out.
>>
>>741821039
>circle class
>square class
>the type of shape you need to use is not known until run time (shapes are loaded from a file for example)
>how can you write code that works on any kind of shape?
That's the problem it solves; runtime type resolution.
>>
>>741819027
Love how there's zero replies to this from "durr if you talk shit about sepples you just don't understand pointers skill issue" larpers
>>
File: 1774956649788015.png (163 KB, 345x412)
163 KB PNG
>denigrate people's programming knowledge all day
>give genius level advice
>I can actually only code simple python scripts
>devilish
Evening is saved boys
>>
>>741824386
I dont understand the "unintuitive" argument enough to engage with it.
programming simply is to me.
>>
>>741810543
only fucking idiots hates header files

that being said, C++ for the longest time (and still may, i don't know) didn't separate declaration from implementation properly, so you'd find implementation in header files out of necessity, which is beyond fucking retarded

>>741819027
this is valid criticism
>>
skill issue
it's actually comfy af if you cut out the meme features
>>
>have to 'just know' what external files you need to include to have basic functionality like strings
It's shit.
>>
>>741830347
>only fucking idiots hates header files
Only a fucking idiot wants to type something twice. That's why they finally implemented modules and caught up to the rest of the world. You stupid niggers are defending a design choice from 40+ years ago. You really don't think there's better alternatives now?
>>
>>741830783
>what's documentation
have you tried to not be a retard?
>>
>>741822219
by only putting declarations in them
after putting in the include guards, the only sunk compile time is opening the file and checking whether it's already been processed as part of the current translation unit or not
this is how it's done in C

the whole point of headers is to define an interface and let your program know how to link against libraries that use that interface
>>
>>741830870
>type something twice
>his IDE doesn't have "create implementation in .cpp" or "add declaration in .h" shortcuts
ngmi
>>
File: 1706972114432671.png (226 KB, 1200x1186)
226 KB PNG
>>741830870
>You really don't think there's better alternatives now?
bUt HeAdEr'S aReN'T mOdErN!!
>>
>>741830575
this. why can't everyone write c++ like we're in the 90s?
>>
>>741830954
I noticed the few people using doxygen for commenting put their comments (in doxygen format) in the headers specifically.
is that so that you can just go to the header and get some simple documentation of things?
>>
>>741830992
>>741831025
Keep rolling your square "wheels" then cavemen.
>>
ok WHAT have you actually coded lately /v/?
>>
>>741830992
Just because there are tools to help deal with horse shit doesn't mean the world is better with horse shit
>>
>>741830870
turns out a header can be included in tons of places, and you don't have to compile anything to know how to link against the object/library where the compiled code is located
it's not complicated, retard
furthermore, it's a really good design
>>
File: asdasdad.png (151 KB, 702x846)
151 KB PNG
c++ is based and fast and comfy as FUCK. It has all the simplicity of C if you want that and all the nice new stuff that comes along with C++. Also libraries exist for EVERYTHING. Not liking c++ or finding it overly difficult is literally a skill issue. It only becomes difficult when you start getting into template metaprogramming stuff or pushing for compile-time gains
>>
C89 is all you really need
>>
>>741831073
doxygen is a waste of fucking electrons
generated documentation is worse than no documentation, and the markup poops all over source
if i see doxygen has been used, i just open up the source code and read that instead

headers are one of the places where taking time to make sure things are readable and has good notes really pays off

>>741831087
keep installing the same library in 20 different places, script kiddie zoomie
>>
>>741831187
I have no clue what you are saying. What does linking libraries have to do with headers that you have to include in your project or write yourself?
>>
>>741831087
and keep reinventing the wheel

>>741831461
headers tell the compiler the names of functions (used in linking) and how to structure function calls when invoking those functions (used in compiling)
they also include structure definitions
>>
>>741831398
I was wondering because I didnt see any use for it and barely any use OF it.

The only thing requiring any external documentation would be for anyone touching the JSON stuff.
this game works by having most of its stuff in compiled code, and a lot of its assets in JSON files that get translated over.
Makes it easy to mod the game to add a lot of things without touching the core and having to recompile.

I can only see external documentation having a place if you wanted to know a bit more about the game's code before messing with the JSON
>>
File: 1773683152001.png (40 KB, 552x338)
40 KB PNG
>>741831392
TMP in modern sepples is comfy, no more std::enable_if shenanigans.
>>
>>741831619
having good documentation that explains how the designers were thinking about their code and how to think about using the code are always welcome in diving into a code base
the only downside is that docs may be misleading or out of date
>>
>>741821284
>That's like saying, "I'll make my car faster by buying a new one"
Its more like replacing the engine in your car and leaving it stock, you know by specs it can achieve x possible torque and power.
The actual code written doesn't matter more so that you've already solved the design and implementation, which by the way is very easy to rewrite in any languages as long as the stl offers the same shit (they usually do) and you aren't relying heavily upon external libraries.
>>
>>741831187
Such a good design that they went through the trouble of designing and adding a whole new system with the stated intent to fix the problems with headers and eventually replace them. If the language committee themselves thinks they're outdated then why do you think you know better?
>>
File: 1755067001914729.png (101 KB, 786x1196)
101 KB PNG
>>741831125
Check out my insane cooooding skills. This creates windows shortcuts for portable pirated games depending on the crack method.
>>
>>741832286
i'm speaking as an experienced C programmer
whatever dogshit design mistakes C++ has made over the years, "fixing" those design decisions by piling on even more dogshit isn't something worth defending
>>
>>741832286
Headers were a shitty design pushed by MS in an attempt to EEE gcc and clang.
>>
>>741799816
>zoomgroidals think sepples is comolicated or unintuitive
lol
lmao
rofl even
no wonder you niggers can't read or manage filesystems
>>
>>741832842
wtf, i hate dennis ritchie and ken thompson now
i didn't know they worked for microslop
>>
>>741832640
So you think you're smarter about language design than the many people entrusted with the future of the language, because of your "experience", which they of course don't possess in vast multiples over you given their position. Got it.
>>
>>741832996
meant modules obviously
>>
>>741832414
Actually coding something already puts you in the top 1% around the larper crowd here.
>>
>>741832842
So the decreased compilation time, easier/better encapsulation, etc, all the benefits which almost all other language build systems offer, are just an evil conspiracy?
>>
>>741830783
wow if only there was a way to know what header includes which function/struct!
>>
>>741833056
i wasn't the one that introduced poorly conceived constructs that broke the robust and application-proven declaration/implementation design pattern in the language that served as a <template> for the eldritch horror that C++ has become
>>
>>741831073
header itself is documentation
back in the day when you didn't have IDEs with autocompletion, people would just go into headers to get a glance of a library's public API
everything in the headers would be the public interface of a library
>>
>>741831125
nothing really, despite being a SW student. I got depressed after my last webshit job and are completely burned out
I should really get my shit together so I can get a job by next month
>>
>>741831392
>It only becomes difficult when you start getting into template metaprogramming stuff or pushing for compile-time gains
it's funny when retards say "C++ is le heckin overly complicated template programming hell!!!" when in reality anyone just keeps their code as simple as they need to
they dont understand the versatility and flexibility of C++, you can go as simple or autistic as you want for a specific solution
>>
>>741832117
glad we can agree
>>
>>741800975
>>the whole point of c++ is optimization
non-programming retard
>>
>>741833056
at this point you dont have to be a language designer to KNOW the absolute designed-by-committe mess nu-C++ has become
thanks god you are not forced to use any of tha though
>>
>>741833624
I burned out on the 3 months of mandatory internship for my bachelor. That was 5 years ago, lmao.
>>
>>741833813
c++ is what happens when some people never get over the (p)OOP fever that affects nearly everyone at some stage in their programming journey
>>
>>741802168
enjoy your namespace bloat
>>
>>741833912
mine was like 3 years ago
time really flies when you are neeting it up
though life is getting tough so I cant keep neeting it up anymore
I saw /g/ has an unironic employment general now so I'll check that out
>>
>>741802768
>whoever decided
that would be the dutch JEW, guido van rossum
>>
>>741833518
You should consider 2 things
>the language is a mess because they cannot remove old features due to boomer complaints and thus have to design anything new around them which of course pollutes what could otherwise be a good design
>no modern language that I know of uses the header/implementation file design despite it supposedly being pristine and perfect
>>
>>741833915
you can write C++ without ever touching a class
>>
>>741802065
>concepts of pointers, and managing yourself the memory.
My favorite solution is to just allocate every heap variable you need at program start time, and never dynamically allocate memory after that. This is the standard technique in embedded applications, but it probably won't work well for games.
>>
>>741833989
there's a general now because the job market fucking sucks ass
the covid windfall is long over and finding a tech job is a nightmare of trying to get past ai filters and the jeet hoard
the gravy train is over unless you luck into an ai hypescam job and have no scruples about being a thieving conman (save for the precious few ai applications that aren't scams, like security)
>>
>>741805463
zoomgroidals are truly the niggerlicious niggercattle generation that king terry tried to warn us about and the glow in the dark cia niggers killed him for it
>>
>>741834041
nearly all embedded applications shouldn't be using a heap in the first place
>>
>>741806874
fioc is a toy language for retarded nigger children
>>
>>741834115
it's funny because I had what I thought was a shitty job back then, but now I regret ever leaving it
the market is just that dire now
>>
>>741810393
>server side of my game project
Give Go a look if you haven't already. It makes server development much more enjoyable since your can instantly iterate on changes instead of waiting an hour for rust to compile. It has a huge standard library that's made for the task as well, so you don't have to deal with 20 crates and hope they don't get supply chain attacked.
>>
>>741808207
rust is tranny nigger dogshit for jewish faggots
>>
>>741834041
>but it probably won't work well for games
arenas follow the same concept, and many of them are allocated at start time or before main loop starts
they are used a lot in gamedev, hell, even since the N64 times
>>
File: 1759173381756304.png (244 KB, 323x581)
244 KB PNG
>>741834368
so is C++
>>
>>741811837
because you're a retarded nigger who doesn't have a clue what you're talking about and you need to fuck off back to réddit already
>>
>>741816269
because fioc is the fisher price blunt plastic child's toy of languages
>>
>>741834197
In the device I'm working on now, the stack size is 4kb, but we need several mb for data we gather and process at run time.
>>
>>741834379
arenas are just zoomer cope for people that take seg faults personally instead of as a sign their program is wrong and needs to be fixed
>>
>>741834368
>rust is tranny nigger dogshit for jewish faggots
I think you need to re-assess this, all the trannies you hate are white, and the jewish faggots enable them and don't participate so its also not for them.
The niggers though, I think they feel the exact same way you do.
>>
>>741834770
you should probably have compile-time limits imposed on your program and ensure it won't exceed those limits at run-time
not saying you are working on mission critical code, but institutions like nasa forbid dynamic memory allocation to ensure programs execute in predictable amounts of time and to prevent some common memory corruption issues even in the case of bugs
>>
>>741830575
so you mean if you just use c augmented by an actual high level language, like you should have been doing to begin with?
>>
>>741830783
>strings
>basic functionality
write your own string handler then
>>
>>741831779
>>741833557
useful info.
If I get around to working on this stuff again I will try to put my documentation in the headers, then.
and put a few minor comments in the cpp...
or rewrite the damn thing to use modules.
>>
>>741834553
sepples is shit, but it's at least capable of doing actual work, unlike fioc, which is a toy designed to mis-educate retarded nigger children
>>
File: file.png (269 KB, 982x1000)
269 KB PNG
>>741834994
>you should probably have compile-time limits imposed on your program and ensure it won't exceed those limits at run-time
No, we need that data. Its fine on the heap
>not saying you are working on mission critical code
It is a class 3 medical device. If the system crashes, the user dies
>but institutions like nasa forbid dynamic memory allocation to ensure programs execute
NASA actually pioneered the standard of allocating heap objects only once at boot.
>>
>>741808207
>gc by default and then turn off the GC when it's really needed
that's D
and what's problem? incompatibility between the two modes that effectively splits the userbase, since GC propagates
like that one article about red and blue functions
>>
>>741835408
>all code must be compiled with most pedantic warnings available
How do you deal with implicit conversion warnings all over the place? static_cast everywhere?
>>
>>741835641
Yes, obviously. There's no room for ambiguity here.
>>
>>741835641
types, contrary to MoDeRn belief, are your best friend
>>
just use odin and if you want metaprogramming use jai when that comes out
>>
>>741802057
Try c+1 != c++ instead
>>
>>741834339
I'm not a huge fan of Go plus the GC is a complete non starter for me. Same reason I never got too heavily into D even though I thought it was pretty cool a while back. I've actually had more issues with C++ compile times than rust so far, and I don't even have that much C++ code yet. Also fuck cmake this shit is complete cancer.
>>
>>741816269
>why do we need a package manager, we compile everything ourselves!
but unironically
>>
>>741835107
C++ has some good stuff that pure C doesn't. Off the top of my head function overloading.
>>
>>741836164
that's an antifeature
pretty much everything in C++ is an antifeature
>>
>>741836496
I think you're wrong. I dont want to do shit like
>add2(int int)
>add3(int int int)
>add4(int int int int)
https://www.geeksforgeeks.org/cpp/function-overloading-c/
>>
>>741836809
when e.g. taking implicit type conversion into account, it can become a guessing game of which function was invoked
>>
>>741835386
what the fuck is fioc?
>>
>>741834783
zoom zoom missed his data structure classes?
>>
>>741836019
>GC is a complete nonstarter
any actual reason or just "I MUST manually manage my memory or I'll lose /g/ penis size"?
>>
>>741837218
ryujinx has GC stutters, yuzu doesn't, shrimple ass
>>
File: 1773109840544.png (709 KB, 1920x1080)
709 KB PNG
>>741836496
>>
>>741837218
I'm autistic
>>
>>741837218
programmers still think every GC is boehm stop the world garbage from 1990
>>
Any language that filters indians is inherently a good language. Any language that doesn't is bad. Simple as.
>>
>>741837379
void* type casting, unions, macros, and tagged structures offer varying degrees of type safety, generic programming convenience, and memory footprint
>>
>>741836164
that's what you use the high level language for, ESL retard, READ
>>
>>741837539
All are accessible with Claude saar
>>
>>741837095
the forced indentation of the code, you fucking luddite
>>
>>741837218
penis size is an actual reason too
what C offers is not some ephemeral ""performance"" but control, and people very much want to be able to exercise that control for various gains whether they will be able to so, much less without crashes, is different question
GC is by design out of direct control, and even if it is not some memory-hogging framerate-chugging monster, it represents a fundamentally incompatible attitude
>>
>>741800306
All the benefits, none of the crap.
>>
>>741800354
Rust is unironically really bad for gamedev
>>
File: 1000014206.png (1.08 MB, 1024x683)
1.08 MB PNG
>the issue with c++ is that it suc when you try to do black magic
Okey?
>>
>>741801310
too much emphasis on binary digits, logical thought, and is not just a superficial/surface level wef sleeper agent tool
>>
>>741838013
>GC is by design out of direct control
not all, many let you configure the GC and some even let you force a purge
>>
kind of a sidenote but why did D flog?
>>
>>741838865
Very early on, it had a Python 2-3 style switch which soured people.
Then Andrei Alexandrescu, its champion who worked at Facebook, eventually stopped pushing it as hard, and eventually stepped away from D.
It's still used a fair bit in Germany, but it'll always be niche because Walter Bright, its creator is just a compiler tinkerer, not really a language designer.
>>
>>741838865
It had trouble staying erect.
>>
>>741799816
It's the AAA cplusplus corpos keeping Terra down because it's an indie language.
>>
>>741800354
You will never be a real woman.
>>
>>741837640
>void* type casting
Invokes hard UB
>unions
Invoke hard UB if you read-before-assigning anything outside of the two types' common initial subsequence
>macros
At that point, just generate code with Python
>tagged structures
Are good for you
>>
>>741842275
i've never once had an issue with fucking up a type cast with malloc(), nor putting things into or taking things out of a container
that just doesn't seem to be a common source of problems, even if technically it's unsafe because the compiler can't check it

tagged structures still have to be type cast to make use of, so that just kicks the void* type cast down the road. if you are cool with tagged structures, you are cool with void* type casts

uninitialized data is an issue in both C and C++
C++ doesn't magically make that go away
the problem with unions isn't that they can be uninitialized, it's that they may take up much more space than needed for one of their representations

templates are essentially shitty macros. yes, they offer type safety, but so do macros if that's something you absolutely must have.

frankly, i don't think all the weirdness of templates are worth it for generic containers (their only reasonable application)
they broke the declaration/implementation design pattern badly, they have completely impenetrable resolution rules, they produce nonsense errors when you fuck them up, they contribute to code bloat, and the standard library is a fucking disaster, just to name a few issues with them off the top of my head
>>
File: chad_comp.gif (3.32 MB, 297x498)
3.32 MB GIF
>>741800354
I used to hate rust because troons and cryptofaggots like it. Now I love rust because I can tell an AI help me write a python program and then use another AI to rewrite the python program into rust which pisses the troons off and the cryptofags are mad because no one gives a shit about their gay little tokens anymore because everyone is investing into AI instead.
>>
File: pmr.png (209 KB, 1080x551)
209 KB PNG
>>741836809
In C this is just
>sum(int *null_terminated_array)
>>
>>741821039
So that multiple things can fit in the same set of data, all of which work differently and are used differently, but at their core level all do the same thing.
since this is /v/ lets use video games as an example

you want to manage buffs/debuffs/status effects and have all of them easily tracked in a single place, so you can do things like cleanse certain ones, buff others, remove some, and other shit you might want to do
but each one requires different data for tracking it, some have durations, others need to store more complicated information (such as a taunt tracking what target you must attack, stat debuffs tracking what stat is targetted and how much, etc), and just in general care about different things, or can even be put into different categories (applied buffs vs auras, permanent passives vs actual buffs, etc)
you could just have some generic "status" with a duration, and 0 being ones that have other things determining on how they are applied/removed and an ID where you have a big list of every possible thing that could be applied and you check them all against this every time, look up the ID, call the right functions. You could do worse than that implementation, such as some absurd solutions like hundreds of functions in your status class or something dumb.
or you just have a virtual class with functions like onapply, onremove, endofturn, onattack, etc
and then a bunch of classes for different categories of status effects, like stats based ones that will care about stat changes and handle it there, more complicated effects are easily implementable and not an issue.

and then probably the biggest benefit is that unlike other solutions where suddenly down the line when you want to add new functionality, like you might want to start having something activate after a passive procs, you can trivially add this and not need to do huge refactoring, its 0 code change to everything else
it just adds a lot of flexibility
>>
>>741830783
Tooling issue. Other languages have imports as well, but you can just tab autocomplete to add an include on top
>>
>>741800106
every C++ project might as well be written in its own language. There's a million ways to do everything, except to do the thing you want to do in which case there's two and they're both the worst thing you have ever seen.
This leads to every group of people basically writing a completely original dialect of C++.
>>
>>741843521
>null_terminated_array
It's called a sentinel you utter retarded monkey
>>
>>741843521
uh, how do you represent 0?
>>
>>741844930
you don't have to sum 0 anon
>>
>>741844930
>>741846904
>>741843521
4 =! 0
>>
>>741802168
Starsector
>>
>>741799860
>Jon Blew
bizzaro blow
>>
"wchar_t" is a stupid name for a key variable type.
>>
>>741799816
so many nodev larpers giving blowjobs to c++ because they heard it's difficult and trad kek
especially lmaoing @ the niggas who think modern games are unoptimized because they're written in the wrong language
>>
>>741800306
Literally the only language that's still kinda fun and doesn't feel like a chore.
Coding is so miserable. I underatand why they always delegate it to Indians and now AI.
>>
>>741850083
maybe coding isnt for you :)
>>
>>741819498
>I've been using c++ for like 5 years and I have no idea about anything you just said. :(
The utter state of vibe coders.
You don't use C++ at all.
>>
>>741850313
I'm stuck with it now, been doing it for 15 years. I used to find it fun because I did a lot of systems development at university but the job market has only served me tedious ASP.NET and Ruby on Rails web apps. Been pivoting towards IT lately as I find it more enjoyable but since I have the most programming knowledge in the department I help with SAP integrations and database stuff from time to time so coding hasn't left me yet.
>>
>>741838629
I never looked into it, why's that?
>>
>>741850478
What's the standard? If you don't know literally everything about C++ you never used it at all? If not then what is that thing you do that does make you a real C++ programmer?
>>
>>741853509
When you dig so deep into it you realize C just makes more sense.
>>
>>741800354
Rust doesnt have official support for consoles (I.e. Playstation's sdk, Nintendo's Sdk). The only thing Rust has for gamedev is a better WebGPU implementation (WGPU) if you choose to use WebGPU
>>
>>741853509
>don't know literally everything about C++
No one knows literally everything about C++, not even the people who made it.
>>
>this thread
Yup, no wonder nudevs can't make good games anymore, millennials don't even know how to code, they just shitpost all day in their discord and take 5 lunch breaks instead of finishing their projects
>>
>>741850478
Not him but peak comfy C++ is just C with optional objects, and whatever standard library stuff like dictionaries unordered_map
>>
>>741854197
Peak C++ has always been when you treat it as "C with the couple features you personally wish C had".
>>
>>741854197
It also has a few other conveniences like vectors and the ability to redefine operators and the paradigm is supposed to be completely different. I say supposed because I learned C first and never fully unlearned it so C practices always slip in.
Thankfully it'a not just me. A lot of projects I studied are just C with classes. They even use the C headers instead of the object based libraries.
>>
>>741852240
https://loglog.games/blog/leaving-rust-gamedev/
>>
>>741853509
>what is that thing you do that does make you a real C++ programmer?
When your code throws error messages longer than standard containers, and one hour later you figure out that's because you need std::remove_cvref_t in one place, that's the moment you can say that you became the true C++ programmer.
>>
>>741799816
I completely agree with you good sir!
I am personally fighting its hegemony by working on my quirky indie game about depression with Rust exclusively!
>>
>>741836809
Haskell doesn't have this problem.
>>
>>741802065
Wrong. Zoomers are completely filtered by the concepts of programming. They love vibe coding though.
>>
>>741801310
They prefer java
>>
>>741805463
You have this idea of it now but in 10-15 years when everything is built on a rigid and complex system of "convenience" that "just works" but is actually contrary to your needs, expensive, anti-consumer and/or privacy invasive you'll have a thought to "do it yourself" but by then it'll be harder because all the tools and knowledge will be lost due to years of vibe coding and faggoted corporate obfuscation.

A variation of this happens every couple of decades since time immemorial.
>>
>>741800341
trying to make any fleshed out proper game will still include piles upon piles of programming
>>
>>741810543
Headers are fine.
Fuck linking.
>>
>>741805006
you 10000% need to write the actual code if you want a remotely fleshed out game with mechanics that arent the most braindead basic thing ever. in which case most are using either
>csharp because thats what unity uses
>gdscript because thats what godot uses
>i think c++ because thats what ue5 uses
>lua because thats what some outliers like love2d use
>>
>>741805463
Vibecoding reminds me of all the junk we produce and destroy the environment with it. Because someone said "don't worry, we will recycle it... maybe... some day"
>>
>>741859010
A lot of UE games are sadly written in literal spaghetti scripting language. I have had to outright ban its use because its almost never used where it supposed to be used.
>>
>>741806050
>>741805934
i genuinely thought C and C++ were much easier when i was new at programming
I started with python and i hated it. i hated how implicit so many things were. i was so confused with how some things basically did themselves, or how it didnt do what i wanted. i also completely despised having to indent instead of organizing my own code the way i wanted
the moment i touched C everything became so much more fun and easier
>>
>>741799816
Don't blame the tools
>>
>>741859010
Lua is comfy. The only language more comfy is Ruby but thank god no one tries to use it for scripting in vidya dev.
>>
>>741859228
>but thank god no one tries to use it for scripting in vidya dev.
explain to a non coder why?
>>
>>741859228
Uhh Nier Automata?
>>
>>741859278
It's
1. Slow.
2. You have 10 different ways to write the most basic things.
3. Metaprogramming turns this 10 into infinity.
>>
>>741859228
so far my experience with lua has been completely awful because of runtime compilation
i dont know how anybody can deal with having to thoroughly test shit before you can even check for basic syntax errors
>>
>>741807454
How do I make myself no retarded.
>>
>>741859478
A huge portion of "programmers" think compilation errors are microaggressions so they much prefer having shit randomly crash at runtime than have somebody telling them they did something wrong.
>>
>>741807454
Pretty much this, the average coder is bad at coding
>>
>ctrl-f lisp
>one post
>>
>#define let const auto
>#define ref const auto&
>#define var auto&
>>
>>741859478
>syntax errors
Bro your IDE? Your linter?
>vim and notepad.exe is all I need
Carry on then.
>>
>>741815279
how does that disprove what he said
>manual memory management does X manually which has the benefits of being manual and the downsides of being manual
>GC does X automatically which has the benefits of being automatic with the downsides of being automatic
>>
File: lever.jpg (121 KB, 412x562)
121 KB JPG
>>741860072
heh jokes on you anon
i use Notepad++
>>
>>741860445
Slava Ukraine brother.
>>
>>741860072
>vim
To be fair, you can turn neovim into an IDE, it even has native LSP support now. The only thing I hate about it is that many LSP plugins expect you to install node shit locally, and the way npm goes (especially lately) that's a big no from me.
>>
sepples is a mess

>>741860490
vatnigger fragility
>>
>>741859105
i do think the blueprints shit is awful personally but i still consider it actual programming
>>
>>741843002
>don't think all the weirdness of templates are worth it for generic containers
just as with macros, the solution to weirdness is to treat implementations of templated containers as a spooky black magic box buried in a single lonely header hidden deep in your codebase
you just sorta have to trust the wizard that he did a good job, and never touch his work unless you're in the most dire circumstances
that being said concepts and requires are pretty cool
>>
for me, it's C
>>
>>741800106
MUH POINTERS
>>
File: Untitled.png (12 KB, 678x106)
12 KB PNG
Gone through UNIX-HATERS handbook recently, and man it really puts all the autistic arguments into a new beautiful light. It has that nice combination of timeless truths and ironic in hindsight assertions. The "epilogue C" talking about different design mentalities is most interesting in the current year. I'd recommend at least reading that last part if you have strong opinions on excellence and elitism (complimentary) in the technical fields.
>>
>>741864257
>UNIX-HATERS
>look up an author
>lost
>>
I feel like everyone intuitively understands pointers immediately and then school/lessons/lectures/videos whatever fucks them up. They try to see if you understand the indirection of pointers and concoct some utterly satanic example where you store the pointer to a pointer to a float inside of an int and have to mix casts and several layers of dereferencing to print 5 on screen and when you finally get it right they think their job is done but now your headspace is polluted by this nonsense and you think back to it every time you see a pointer. There's only like 3 legit ways to ever use a pointer and yet they teach you over a dozen of them. By the time you finish a programming course you've seen pointers used wrong more often than you've seen them used right, all for the sake of creating gotcha questions on an exam.
>>
>>741864257
what's your grand alternative to the unix approach?

>complimentary
complementary
>>
File: iq1652359013597.jpg (316 KB, 800x1503)
316 KB JPG
>>741864660
>>
>>741865630
I didn't say the authors are completely correct in every respect and we should bring back lisp machines. If anything, glorifying lisp is way more elitist option nowadays. But now that everything is following the "worse is better" paradigm, you sure get a new appreciation for software that was last updated a decade ago, because there is nothing to add.
>complementary
Being a grammar nazi only works when you are being correct yourself. But you have made me double check the dictionary definition, so you should do the same. Hint: what's the antonym to derogatory?
>>
>>741866343
>unix bad
>nothing better
>>
>>741820689
stop promoting this faggot
>>
>>741864660
when I was learning C / C++ in school 20 years ago, the biggest thing that helped me was practical examples. Like you said, school had a lot of "gotcha" exam questions with a whole bunch of stuff that is totally irrelevant to how you actually use them.
Seeing something like HWND hwnd = CreateWindow(...) in WinAPI and realizing the handle is just a pointer that you pass around places because you don't want to pass the entire (hidden) structure of a window makes a lot more intuitive sense than first year exam shit like


void farts(int* c) {
*c -= 2;
}

void main() {
int a = 5;
int* b = &(a++);
farts(b);
printf("%d", a); // what gets printed here
}
>>
>>741868358
you have proved his point
>>
>>741803428
Jeets would never let that happen.
>SAAAR HOW MAKE GAME NOW MODERCHOD
>>
>>741868358
it prints a compilation error because there's no "include", "std::" or "using namespace std"
>>
File: compile.png (64 KB, 1414x648)
64 KB PNG
>>741868784
it actually doesn't compile at all because you can't use & on an r-value but it was a contrived example anyway
here you go
>>
>>741864660
>and then school fucks them up
Bingo. (((They))) don't want everyone to be smart. (((They))) want everyone to be dumb retards because it's easier to control them.
They will make sure that by the end of the school you hate math, you hate programming, you hate history, biology, physics, everything.
And most importantly that 99% will absolutely fucking HATE reading books because (((they))) will force you to suffer through the most boring, the most pretentious, the most bloated, the most never-ending liquid diarrhea garbage like War and Piece or Infinite Jest.
>>
>>741799816
Games should be coded on relay gates
>>
>>741799816
C++ is the "it's not because you can do everything that you need to do everything" the language.
You can use C++ in a way it fucking trounces shit like rust in everything, including code readability.



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