Is C++ better than C?

  Рет қаралды 33,428

Tsoding Daily

Tsoding Daily

16 күн бұрын

Streamed Live on Twitch: / tsoding
Enable CC for Twitch Chat
Panim Playlist: • Panim
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Pay for my VPS: zap-hosting.com/en/shop/donat...

Пікірлер: 265
@DogeOfWar
@DogeOfWar 14 күн бұрын
If you used the C-style "virtual" functions where they are beneficial and use C++ specific stuff where it's beneficial then you are still writing C++, the best C++ devs know when to use certain features and when to fall back on "raw-dogging" it. that is a strength of the language imo
@chepossofare
@chepossofare 14 күн бұрын
That's exactly why C++ is a disgrace.
@rogo7330
@rogo7330 13 күн бұрын
So, strength of the language is that it compiles to the ELF file?
@stolenlaptop
@stolenlaptop 14 күн бұрын
"C sucks... But a little less than everything else"... Some random Internet guy.
@cobbcoding
@cobbcoding 14 күн бұрын
C is the worst programming language except for every other programming language.
@SimGunther
@SimGunther 14 күн бұрын
@@cobbcoding Which is why C is a lingua franca and making a transpiler that generates C++ code is a futile effort. Ask Andreas Kling and what happened with Jakt.
@blastygamez
@blastygamez 14 күн бұрын
C is the best programming language.
@valizeth4073
@valizeth4073 14 күн бұрын
Except that isn't true at all, 60 years of language development and it's practically unchanged. C23 is praised to the heavens and they added roughly 5 valuable additions.
@rusi6219
@rusi6219 14 күн бұрын
@@valizeth4073 precisely; it's not bloated to hell like C++ is.
@AlessandroStamatto
@AlessandroStamatto 14 күн бұрын
1:44:30 "No, C++ was not better than C for this project."
@skeleton_craftGaming
@skeleton_craftGaming 14 күн бұрын
he implemented oop..
@bofa-zi4fj
@bofa-zi4fj 14 күн бұрын
@@skeleton_craftGamingjust because another language comes with one specific functionality does not automatically make it better for the project.
@rusi6219
@rusi6219 14 күн бұрын
@@bofa-zi4fj yeah, also most learning resources for C++ present OOP as the default so that's what people typically end up implementing whether they intend to or not.
@skeleton_craftGaming
@skeleton_craftGaming 14 күн бұрын
@@bofa-zi4fj I agree . But When the other language split from The language that you're using specifically for a feature that you were required to implement (for your algorithm to not crash) then it might [I wouldn't say that it necessarily does but it might; and it does in this case (Because C++ is objectively better language [as unpopular as that may be)]
@mattshu
@mattshu 13 күн бұрын
@@skeleton_craftGaming ]*
@froop2393
@froop2393 14 күн бұрын
Sorry to say that your videos aren't recreational at all... They are highly educational and I learn a lot from them. Thank you so much!
@user-do4fm1nz2f
@user-do4fm1nz2f 14 күн бұрын
There is an useful technique called CRTP - static polymorphism. It allows you to write compact OOP code and doesn't raise problem with func pointers invalidation.
@danielarf4409
@danielarf4409 14 күн бұрын
show me the book!
@Eugensson
@Eugensson 14 күн бұрын
... you can find the answer to this and other questions in our new issue of “NO!”. Coming in June.
@pookiepats
@pookiepats 14 күн бұрын
El oh el
@Rose-ec6he
@Rose-ec6he 13 күн бұрын
You missed out linking the source in the description today, i dont know if that was intentional or not. I personally find it extremely valuable, i have learnt so much from being able to follow along with your process by video and consulting your source when I mess up any details or want a rough idea of conventions to follow. Obviously, I don't expect this of you but if this was a slip-up, here's your opportunity to fix it. Anyway, love your content. Thanks again
@maxpoulin64
@maxpoulin64 14 күн бұрын
I think the proper solution for the state preservation would be a custom allocator that keeps tracks of allocations like React hooks work: when reloading, the allocator just hands back out the same allocations in the same order so your state is preserved. Then you also get to detect when the data layout changes and force a full reload if the number of allocations change or the requested size changes. It still would break the objects though, so you'd also need to only do that for the state and have a separate struct just for state so you don't overwrite the vtable pointer. Fundamentally hot reloading native code without breaking pointers is hard.
@exosdel
@exosdel 14 күн бұрын
Love ur vids on C, keep them comming!
@saidwho9891
@saidwho9891 12 күн бұрын
1:01:00 Lol, we can already tell that C++ is worst than C, cause you're already starting to ask yourself "should I make this public or protected", and fall in the C++ dilhemma of philosophizing about objects 😂
@Cmanorange
@Cmanorange 13 күн бұрын
26:10 raysan appreciation post
@TheJanhalsema1
@TheJanhalsema1 14 күн бұрын
Depending on your definition of better, arguably, C++ is always better. You can just use it as C and only add the bits you like e.g. constexpr / templates / operator overloading and such. In recent years C++ even got the long standing missing bits from C like named struct initalization.
@meme-vw1vi
@meme-vw1vi 13 күн бұрын
i agree
@StevenMartinGuitar
@StevenMartinGuitar 13 күн бұрын
Was going to make the same point, you can 'pretty much' always use C++ and if you feel like only using C you just type it and it works. Besides people only get stuck with the messiness and complexity of C++ because they chose to use those features of C++ to begin with. You can just choose not to use them and go about it the C way instead.
@TurtleKwitty
@TurtleKwitty 12 күн бұрын
Same order only named struct init but mostly yes
@araarathisyomama787
@araarathisyomama787 10 күн бұрын
Always better? Risky argument. It could be true if C++ compilation wasn't so dog slow compared to C and it gets exponentially worse in big projects if you're not actively preventing this problem and almost nobody is. So, if one's target style is very close to C either way, there is an incentive to drop "pp" from the source files. Performance is another rabbit hole where every good argument must be post-fixed with several layers of "but sometimes" or "but actually". Honestly I think it's almost a tradeoff. Experienced C programmers are used to manual labor in C, but they get much simpler language in exchange, they get really good at whatever they do and they do stuff that seems "hard", "unnecessary" or "not idiomatic" for C++ programmer automatically. EOT On the other hand all C++ programmers had to invest years learning the language that they will never understand fully, nor compilers will be able to implement consistently, as long as committee is extending it every 3 years... in exchange you get a language that can not only implement anything, but be written in any paradigm - to certain extent. Quite honestly if you get over this very high barrier I think you can implement anything pretty fast and in a syntactically verbose, but elegant at times, way, subjectively better than C - focusing a little bit more on the idea, than raw implementation - in a way. Expressing intent is a buzzword for C++ programmers. Yet, for traditionally C programmer those things seem actually "hard and unnecessary" and create a bigger cognitive overhead than the alternative of "just writing some more C code". Who is right? Is anybody wrong? I will probably get ran over in a minute
@GoldoEb
@GoldoEb 14 күн бұрын
1:26:00 BTW, you can also specify the name of the "X" macro. Just use the macro parameters like in the following example. #define LIST(handler_) \ handler_(banana) \ handler_(apple) \ handler_(cherry) And now you can have multiple different X-macros (handlers) and each of them will be defined.
@hedlund
@hedlund 13 күн бұрын
Ooh, never came across that before. Cheers!
@saidwho9891
@saidwho9891 12 күн бұрын
Yes, this is less known but you can pass the second macro name as an argument, just not sure if this is 100% standard
@hedlund
@hedlund 14 күн бұрын
@35:00 (-ish): Have you done any streams or vods on Rust/C interop specifically? If not I'd love to see it, at some point :) Edit: Also, wasn't Soursoup head of programming research at Bell Labs for a long-ass time?
@MrMeltdown
@MrMeltdown 6 күн бұрын
29:42 I spent many hours in a pub reading through the C++ books understanding this... that along with move constructors etc.... Then you embed that lot in some Templates and you have entered a new layer of &&& ... hell. People have a problem with perl... It is no where near that bad. Tbh.
@opsJson_
@opsJson_ 14 күн бұрын
why not set the functions pointers again on hot reload? I mean, u already rebuild the vtable on hot reload
@xavierthomas1980
@xavierthomas1980 14 күн бұрын
C++ is way better, but also more complicated. It provides a lot of great ways to use a foot gun to shoot yourself in the face. However what you do in C compiles in C++, templates are better and safer than macros, OO is often bad but most abstractions have also very good use cases. You just have to learn how to use C++ correctly. This is (almost) feasible in a lifetime. The bad is not the fault of C++ but of the user of it.
@rusi6219
@rusi6219 14 күн бұрын
Only C89 compiles in C++, not C95 or anything more modern. And having a million ways to solve 1 problem is not a good thing; for every potential "solution" you have ten issues you have to think about. And figuring out the right solution to the given problem becomes increasingly difficult the more "solutions" you introduce.
@miroaja1951
@miroaja1951 14 күн бұрын
C++ is definitely one of those fine art languages, almost impossible to write well, but when it is written well it is really something. It's absolutely plagued with a bunch of unnecessary bloat brought on by years of iso-wack stuff, but it has a relatively simple core that can do absolutely anything and everything. In a way c and c++ have a lot of similarity in the vibe department aside their syntax and rules. To a C programmer c++ often feels bloated, unintuitive and like it's trying to always be smarter than you. To a C++ programmer c often feels contrived, stale, and pointlessly restrictive. Both are an absolute skill issue and from an outside perspective seem like a meaningless squabble. C++ has its place in building things, C also has its place. You can use either, you can use both, just don't footgun yourself like you can in both.
@rusi6219
@rusi6219 14 күн бұрын
@@miroaja1951 neither is a footgun stop telling yourself that to make yourself feel more clever than you are. And C++ devs have a tendency to write "clever" code that is near impossible for any third party to comprehend - that is not a skill issue, it's what bad practices coupled with bloated languages (and ego) lead to.
@miroaja1951
@miroaja1951 14 күн бұрын
@@rusi6219 did you actually read what I was saying or did you just want to be angry at someone?
@Henry-sv3wv
@Henry-sv3wv 12 күн бұрын
why use unsafe c++ if we now have a safe rust
@kibels894
@kibels894 14 күн бұрын
I work on a project with a C engine and C++ plugins. If you don't care about what happens with exceptions/signals it's fine but shit gets messy when it has to cross from one runtime to the other and back.
@NoizyCr1cket
@NoizyCr1cket 13 күн бұрын
36:24 "Barney Soursoup" 🤣
@John-yg1cq
@John-yg1cq 13 күн бұрын
I guess the next logical step is to define a pointer to another class that is kept in the application state that contains those function pointers instead of the built-in vtable, and then leverage C++ shenanigans to make that easier?
@prof.dr.davidbuzatto
@prof.dr.davidbuzatto 14 күн бұрын
I'm a C enthusiast and the only thing I miss is a standard implementation of the elementary data structures like lists (stack, queue, deque, list), priority queues, sets and symbol tables (red-black trees and hashtables).
@rusi6219
@rusi6219 13 күн бұрын
LISP programmers be like:
@xravenx24fe
@xravenx24fe 13 күн бұрын
There's nothing wrong with scouring the web for libraries to accomplish the same purpose a standard library does. You can always write your interfaces to bypass libs and replace them with your own code later, it's not like you're getting by without platform specific or 3rd party libs in any serious project anyway.
@TurtleKwitty
@TurtleKwitty 12 күн бұрын
To be fair to Bjarne, early C++ was crosscompiled to c so it would literally be a superset and full interop and then it stuck haha
@antonpieper
@antonpieper 14 күн бұрын
`override` implies `virtual`, so you only need to put `override` on member functions in child classes
@Argoon1981
@Argoon1981 13 күн бұрын
override keyword, is not available in older c++ code bases, it exists only since c++11.
@antonpieper
@antonpieper 13 күн бұрын
@@Argoon1981 you should be using C++11 or newer
@Argoon1981
@Argoon1981 12 күн бұрын
@@antonpieper That is not always a option, because of required libraries that never got updated, there's people still locked on c++03 code bases and they will be for many more years.
@misisumegi6138
@misisumegi6138 14 күн бұрын
im not 100% sure i assume it crashes because you unload the dynamic library and thus the pointer to the vtable is invalidated (sorry i didn't fully watch the previous episodes) to update to it i think the simplest way would be to create a copy of each element but there are 2 problems 1 there are no virtual copy constructors 2 you cannot use polymorphism because the vtable is outdated at minimum now the best way i can think of solving this is creating a copy factory function that auto registers new classes using CRTP and identifies types using typeid but im not sure if it would work i will try to implement it by the next vod and report about it
@saidwho9891
@saidwho9891 12 күн бұрын
26:15 Honestly, the only reason you have to convert your libraries to C++ style is that they are header-only libraries, if you separate implementation into .h and .c you can keep using all the C features and still being compatible with C++ or any other systems language.
@levvayner4509
@levvayner4509 14 күн бұрын
It's amazing how much effort you can exert if you don't want to write a few lines of CSS to achieve the same goal. Great video!
@belst_
@belst_ 14 күн бұрын
Barney Starsoup is actually a genius
@HonsHon
@HonsHon 14 күн бұрын
Bourne Stopdrop
@ThomasLee-vs2gu
@ThomasLee-vs2gu 14 күн бұрын
@@HonsHon Bono Stopshop*
@dickheadrecs
@dickheadrecs 14 күн бұрын
@@ThomasLee-vs2gu Bong Supermarket*
@Phantom-lr6cs
@Phantom-lr6cs 14 күн бұрын
lol
@howdoiexitvim-sg2xl
@howdoiexitvim-sg2xl 13 күн бұрын
I didn't even notice until i read it like three times XD
@danopamine
@danopamine 12 күн бұрын
haha not a fan of python myself but you joke ranting about mentioning "a toy language like python when discussing system languages" just remined me of John Carmack who was asked what programming language he currently loves the most and he responded with python lol :D
@saidwho9891
@saidwho9891 12 күн бұрын
one of the big issues you gonna have with C++ variadic templates is the error messages lol, that's why i think instead you can have parameter pack of Task*... args
@Argoon1981
@Argoon1981 12 күн бұрын
I personally code c++, more or less in a C like way, using C++ ism's where they make sense and my life easy or where C ism's aren't supported, not cout/cin or streams either, printf all the way. I follow what is called unorthodox c++. I'm not saying is the absolute best way to code c++, is the way I like to code and the way that makes me happy and more productive and that is it.
@trwn87
@trwn87 14 күн бұрын
C is cool because it's challenging. 😎
@rubyciide5542
@rubyciide5542 14 күн бұрын
Yeah right manually flipping bits inside a flipflop is easier so its trash
@depralexcrimson
@depralexcrimson 14 күн бұрын
@@rubyciide5542 manually sending electrical inputs through a baseboard is way more challenging so that is trash too.
@DiegoSita
@DiegoSita 13 күн бұрын
​@@depralexcrimsonmanaging the velocity and directions of every single electron on a circuit is way more challenging so this is also trash
@Argoon1981
@Argoon1981 13 күн бұрын
I don't agree at all, template heavy, virtual function crazy, exception madness, pure OOP c++, is way more challenging and complex. C functional/data oriented programing, is so much simpler, so much more fun to work with IMO.
@saidwho9891
@saidwho9891 12 күн бұрын
@@rubyciide5542 U talking about a floppy diks ???
@SimGunther
@SimGunther 14 күн бұрын
Can your C do constexpr like C++ can? I don't think so!
@FlanPoirot
@FlanPoirot 14 күн бұрын
C23 has constexpr, it's deliberately made more constrained than C++'s version tho
@astro4490
@astro4490 14 күн бұрын
⁠@@FlanPoirotwym more constrained?
@0xfadead
@0xfadead 14 күн бұрын
​@@astro4490 No compile-time crimes
@SimGunther
@SimGunther 14 күн бұрын
@@0xfadead Like what?
@rusi6219
@rusi6219 14 күн бұрын
Having more poorly-implemented features is somehow supposed to be a w?
@alexpyattaev
@alexpyattaev 14 күн бұрын
Clangd LSP is quite good with c++ too
@RandomGeometryDashStuff
@RandomGeometryDashStuff 12 күн бұрын
31:31 will `(decltype((da)->items))` preprocess to `()`?
@TsodingDaily
@TsodingDaily 12 күн бұрын
Yeah, I already fixed that.
@markmckenzie5343
@markmckenzie5343 13 күн бұрын
44:18 the way you said "pure" lmao
@redheavenhero7709
@redheavenhero7709 14 күн бұрын
The reason behind inability to compile program with std::vector is an extremely messy design of initializer_list in C++ which poorly supports move-only types. And as far as I know C++ standardisation commitee explicitly refused to fix it.
@alf5197
@alf5197 14 күн бұрын
initializer list's design in general is flawed in many ways, starting with the name. It's a hard thing to get right and it was introduced at the same time as all the other very hard to get right things in C+11 so I don't blame anyone but it's not ideal. there have been proposals to change this though www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4166.pdf
@ominusliticus8264
@ominusliticus8264 14 күн бұрын
It makes no sense to copy construct, then there would exist multiple handles to the underlying pointer which defeats the point of calling it a unique ptr. Instead, you have to be sure to move or forward ownership of the objects throughout your construction or emplacement calls. I wrote another comment that gives two examples.
@redheavenhero7709
@redheavenhero7709 10 күн бұрын
@@alf5197 The issue here is not that they didn't get it right on the first try but they don't want to admit it as a serious enough problem to be fixed.
@redheavenhero7709
@redheavenhero7709 10 күн бұрын
@@ominusliticus8264 yes, it makes no sense to copy however it is behavior std::initializer_list enforces as it only provides const& access to its elements regardless its own qualification thus rendering initalization of std::vector from a braced list of elements impossible.
@aniketbisht2823
@aniketbisht2823 14 күн бұрын
Function overloading is also a nice feature that C++ have. Lack of it in C forces you to define functions as "sin, sinf, sinl" which is quite lame. C APIs like OpenGL are full of these functions which seems silly as a C++ programmer. Whereas in C++ it's just std::sin and it detects at compile time which version is appropriate and calls that. Using function overloading enables static polymorphism / pattern matching based on types and arity (the number of parameters that it takes). If there is any ambiguity it would result in compile error.
@Capewearer
@Capewearer 14 күн бұрын
I especially love the fact that some people hate operator overloading. That means they have never thought about clarity of syntax with long words (e.g. Matrix.addMatrix(Matrix_2) instead of Matrix + Matrix_2).
@aniketbisht2823
@aniketbisht2823 14 күн бұрын
@@Capewearer std::chrono is also an excellent example where operator overloading makes everything simple and intuitive while providing type-safety without any performance loss.
@ElPikacupacabra
@ElPikacupacabra 14 күн бұрын
there's a `_Generic` macro for that 😉
@rusi6219
@rusi6219 14 күн бұрын
So basically you like that C++ does the actual work for you? How lazy is that
@dysfunc121
@dysfunc121 14 күн бұрын
@@rusi6219 Lazy can be good, efficient.
@babenoff
@babenoff 14 күн бұрын
Daesh horoshii uchebny jazyk😮
@friedrichmyers
@friedrichmyers 13 күн бұрын
My rule is simple. Write C in C++ and if things needs to be bananas, use C++ features. I still don't write classes unless I HAVE to. I don't use the new C++ std library functions unless I HAVE to.
@tapwater424
@tapwater424 13 күн бұрын
I add templates to all my functions to increase compile times by 1000%
@John-yg1cq
@John-yg1cq 13 күн бұрын
Only problem is that C++ hijacks Structs and turns them into classes with public by default semantics. (Including Vtables, constructors, destructors etc. etc.) Essentially, you loose the default C PoD struct. There's probably some ways to get it back, but that's not obvious to the new developer.
@friedrichmyers
@friedrichmyers 13 күн бұрын
@@John-yg1cq Yes that is a problem but it doesn't hinder much of my performance because C++ isn't Python. And I stick with "hacky" ways of doing things unless I really have to decide on properly making a class and its respective methods. Many games use virtual tables and they are still fast enough. Because C++ is a highly optimized and fast language with modern features And it is not Python or Javascript, ofcourse. I use structs as a way to just group some variables. That's all that is for me.
@charlieking7600
@charlieking7600 11 күн бұрын
​@@tapwater424it's worth the wait. And the main trouble of C/C++ is header system. You can read the story of Ingo Molnar, who wrote patches for Linux kernel just to speed up enormously slow compilation. E.g. Java and Pascal have module system, which allows for much faster compilation.
@John-yg1cq
@John-yg1cq 11 күн бұрын
@@friedrichmyers There was a paradigm shift in gaming I heard, C++ dominated the 2010s but now we're seeing a bit of resurgence towards C. Still, it's mostly becoming a problem when you go nitty gritty into the details, I agree. But selling C++ structs as C structs is *technically/achtually* incorrect. :^)
@msxmlable
@msxmlable 14 күн бұрын
re-implement a poor man's COM, love it :)
@pemrograman-cepat3393
@pemrograman-cepat3393 9 күн бұрын
Wow. Your title is always legit 😮
@derekpmoore
@derekpmoore 14 күн бұрын
Yes
@MG-yc6jr
@MG-yc6jr 14 күн бұрын
C++ is just a dlc of c
@Capewearer
@Capewearer 14 күн бұрын
More like Total Conversion.
@rusi6219
@rusi6219 13 күн бұрын
@@Capewearer it's to C what The Frontier is to Fallout
@Capewearer
@Capewearer 10 күн бұрын
@@rusi6219 likely what Arcane Dimensions to Quake one is: the true sequel.
@rusi6219
@rusi6219 10 күн бұрын
@@Capewearer I think you mean to say what crack life is to half life.
@Capewearer
@Capewearer 9 күн бұрын
@@rusi6219 that's true for Rust.
@FDominicus
@FDominicus 10 күн бұрын
Maybe you like to make this session with D? Or Objektive -C?
@FDominicus
@FDominicus 10 күн бұрын
As long as I can avoid C++ I will. And I can't see a change to needing it in my forseeable future.
@jhi-42
@jhi-42 14 күн бұрын
My first job was also C++ Qt. I try to forget it.
@RushFuture
@RushFuture 13 күн бұрын
What was wrong? I've using this tandem for 10+ years more or less successfully :D
@mwlulud2995
@mwlulud2995 13 күн бұрын
​@@RushFuture why not use electron JS😉?
@RushFuture
@RushFuture 13 күн бұрын
@@mwlulud2995 mbedded, low resources
@senbonzakura662
@senbonzakura662 13 күн бұрын
@@mwlulud2995u mean tauri, nobody uses that bloated garbage anymore
@qqshutup7175
@qqshutup7175 13 күн бұрын
@@mwlulud2995 an engine to render a window, how wonderful... it's like epic games' launcher, a game engine to install a game, an installer that was supposed to have a maximum of 5MB becomes 150MB
@alanwest6949
@alanwest6949 13 күн бұрын
Yes.
@Idiomeme_com
@Idiomeme_com 14 күн бұрын
Wow 1 hour
@MrMeltdown
@MrMeltdown 5 күн бұрын
In the earliest c++ you could write to the this ptr when you wanted to do in place new….
@nordgaren2358
@nordgaren2358 13 күн бұрын
Oh no. Does he find out that vtables aren't FFI safe in this video?
@apenaswellignton
@apenaswellignton 14 күн бұрын
POG
@michaelmas9817
@michaelmas9817 14 күн бұрын
yeah yeah, Java is just a subset of JavaScript
@joseoncrack
@joseoncrack 13 күн бұрын
🤣
@mrmaniac9905
@mrmaniac9905 14 күн бұрын
that title made me have an audible gasp. you scared me tsoding, you scared me.
@inferrna
@inferrna 14 күн бұрын
Qt, Новосибирск... А не 2Gis ли это?
@TsodingDaily
@TsodingDaily 14 күн бұрын
Нет, это был Новокузнецк. Но в 2gis я тоже чуть-чуть работал.
@TechTutor429
@TechTutor429 5 күн бұрын
Great
@hughjass6928
@hughjass6928 14 күн бұрын
Short answer is yes
@JerehmiaBoaz
@JerehmiaBoaz 7 күн бұрын
And the long answer is: yes indeed, the only problem C++ has is the burden of backward compatibility with C and old style C++ that makes the language unsafe and overly complex. What C++ really needs is Rust's "unsafe" keyword to tag all the legacy C and C++11 stuff people shouldn't use unless they know what they're doing (which 90% of them don't).
@origamitraveler7425
@origamitraveler7425 14 күн бұрын
based
@dvillegas
@dvillegas 14 күн бұрын
Oh god not Qt, anything but that, we have a legacy app at work on Qt, I have no fucking clue what it does or how it does it and touching it terrifies me everytime
@vladimirkraus1438
@vladimirkraus1438 13 күн бұрын
That's not a problem of Qt but the problem of your badly designed application or your lack of understanding of Qt. Qt is still (one of) the best tool for professional grade desktop applications.
@kirillratkin1590
@kirillratkin1590 14 күн бұрын
Maybe Zig will save this World ;)
@vincentl7022
@vincentl7022 14 күн бұрын
I was looking for that comment thanks
@rssszz7208
@rssszz7208 14 күн бұрын
Am learning cpp hope it helps😅
@nobodyspecial1553
@nobodyspecial1553 14 күн бұрын
I just like writing code in C. That is all. I make no claims about superiority. I'm a guy who programs for pleasure. 😏
@dutchdykefinger
@dutchdykefinger 13 күн бұрын
my c++ code is filled with standard C library shit lol, it's deceptively close to ansi C under the hood the way i play with it lol but man i love the namespaces, i kind of use them as (strictlt public) classes to organize and categorize my codebase, but it's mostly just good old structs and pointers under the hood, i don't even bother with c++ class implementation, but i do love the namespaces
@MrKevinontube
@MrKevinontube 13 күн бұрын
Script tcl Bebe has got your back.
@Guilty-vv7xl
@Guilty-vv7xl 16 сағат бұрын
TCL is hell 😭
@MrLT-vf3wr
@MrLT-vf3wr 14 күн бұрын
@16:36 "Symbol mangling is done by C++ because the linker only supports a global namespace". - The Secret Life of C++ - Symbol Mangling. The chapter explains all the nitty gritty details of C++ symbol mangling. Quite interesting and informative.
@potatomaaan1757
@potatomaaan1757 14 күн бұрын
1:23:43 X-Potato (only real Gs will get this reference)
@ominusliticus8264
@ominusliticus8264 14 күн бұрын
Not sure if you'll read, but to use `std::vector`, your plug_update function should call `std::make_unique(Move_Vec2(...))` for every new task, instead of `new Move_Vec2(...)`. The cleanest way is to then use fold expressions and `push_back` or `emplace_back`
@ZoraAlven
@ZoraAlven 14 күн бұрын
44:22
@shrddr
@shrddr 14 күн бұрын
Barney Soursoup 🤔
@Phantom-lr6cs
@Phantom-lr6cs 14 күн бұрын
lol
@cobbcoding
@cobbcoding 14 күн бұрын
C wins yet again
@oraz.
@oraz. 14 күн бұрын
C is more enjoyable. Objectively I dunno.
@Phantom-lr6cs
@Phantom-lr6cs 14 күн бұрын
c is more easy that's all and it's not complex as c++
@senbonzakura662
@senbonzakura662 13 күн бұрын
How is it enjoyable? You have to literally do everything yourself. At some point it becomes a waste of time, and honestly a pain in the ass when other languages exist
@rusi6219
@rusi6219 13 күн бұрын
@@Phantom-lr6cs complex with bloat is bad, not good.
@GillesLouisReneDeleuze
@GillesLouisReneDeleuze 14 күн бұрын
oh yes my favorite language zeep-zeep lus-lus
@BobChess
@BobChess 14 күн бұрын
C++ can do C but C can't do C++
@dutchdykefinger
@dutchdykefinger 13 күн бұрын
well that can't be entirely true C++ was literally a C library for over a decade at bell laboratories, until c++ was standardized to its own standard in 1998 lol of course C compilers were updated with new tricks to support more things for the library in C as it evolved, before c++ became its own thing but it was still a newer ISO standard of C rather than a C++ compiler. before 1998, C was the only one that could do C++ lol there's a reason pretty much every C++ compiler can compile C, they wouldn't all go out and implement backward support for C in their C++ compilers for shits and giggles, it was already there because it evolved from C that's pretty much the only reason they almost all can and do, C is the cause, not the effect lol
@RajVishwakarma-jt4kw
@RajVishwakarma-jt4kw 14 күн бұрын
What is his real name 🤔?
@SimGunther
@SimGunther 14 күн бұрын
Alexey based on his commit history
@cobbcoding
@cobbcoding 14 күн бұрын
zozin
@user-nt1uf4gl1i
@user-nt1uf4gl1i 14 күн бұрын
почалось)
@aliullah2203
@aliullah2203 14 күн бұрын
I like C# more than C++. Nice video as always 👌
@OREYG
@OREYG 14 күн бұрын
Those languages are incomparible
@dutchdykefinger
@dutchdykefinger 13 күн бұрын
i never really did much c# but i did javascript/ecmascript so i actually kind of did as tons of shit is lifted from C# lol i guess typescript is even closer seeing as it actually has hard typing lol
@meme-vw1vi
@meme-vw1vi 13 күн бұрын
@OREYG what makes you say that?
@Henry-sv3wv
@Henry-sv3wv 12 күн бұрын
they say vala is like c# but compiles to c and makes GObject GTK GUI programming more easy
@wlcrutch
@wlcrutch 7 күн бұрын
No.
@nordgaren2358
@nordgaren2358 14 күн бұрын
I recently had to model C++ "inheritance" into Rust, so that I could "make" C++ structures in Rust for patching Elden Ring. It was pretty cool! There's some pain points in Rust. Mostly just stuff that has to be done manually. I could imagine C is even more painful in that regard.
@rusi6219
@rusi6219 14 күн бұрын
Well if you tried C you a) wouldn't have to imagine and b) find out that you're wrong
@nordgaren2358
@nordgaren2358 14 күн бұрын
@@rusi6219 I have done it in C for less complicated projects. How am I wrong ? You literally have to do things more manually in C.
@Henry-sv3wv
@Henry-sv3wv 12 күн бұрын
@@rusi6219 c and c++ is unsafe
@epic_gamerXD12345
@epic_gamerXD12345 14 күн бұрын
No
@God-vl5tk
@God-vl5tk 14 күн бұрын
Not surprised by someone who says "Right" after every statement he makes.
@Nova32x
@Nova32x 14 күн бұрын
Is he wrong tho?
@RandomNoob1124
@RandomNoob1124 13 күн бұрын
Bruh corporate engineers spam right after every statement at work holy shit it’s like shadow clones 🤦🏾‍♂️
@patrickjdarrow
@patrickjdarrow 14 күн бұрын
Me watching this as a python script kiddie 👁️👄👁️🍼
@aniketbisht2823
@aniketbisht2823 14 күн бұрын
Macros's are poor man's templates for generic programming and meta-programming. Not having constexpr (compile-time computation) is a huge downside for C. C23 introduced constexpr but those are only "variables" a.k.a constants not "computation". And lack of "constexpr if" means you can't make compile time decisions with them. For that you still rely on the pre-processor (#if def's). These two features alone enables you to write libraries like std::chrono and fmt. Both of which are better than their C counterparts : and . They catch many errors at compile-time and generate better assembly (due to eliding computations which could be done at compile-time). You are passing floats every in the name of "seconds". The only thing backing it up is the documentation (if any). std::chrono::seconds performs all the checks and conversions for you without any loss of performance.
@MrOnePieceRuffy
@MrOnePieceRuffy 13 күн бұрын
Whats this Question? A good language has a string class. Case closed.
@matrixnorm6672
@matrixnorm6672 14 күн бұрын
no
@Capewearer
@Capewearer 14 күн бұрын
...because it's MUCH better.
@gagagero
@gagagero 14 күн бұрын
My dad is stronger than your dad.
@rogo7330
@rogo7330 13 күн бұрын
One thing why people talk about C as "old" and "hard" just because libc is very old, full of bugs and most of the times inconvinient. I personally reference to it as "undefined code with global states library". Thankfully POSIX does include functions where you can provide a pointer to an instance of the state, thus having ability to do several things at the same time, but it is not everything at it honestly should be the default. If Python would not had a lot of predefined classes for strings and stuff it would be very annoying language to write in. Standart library of the language _is_ the language these days.
@danielmilyutin9914
@danielmilyutin9914 14 күн бұрын
Provide the link to your code. Want to see what are you doing there with C++. Maybe (no promises here), will give you some advice how to improve it or to use idiomatic C++. Looks like your std::vector should be `std::vector`. This will relief you from writing destructor.
@inferrna
@inferrna 14 күн бұрын
C beats Rust, C++ beats C, Rust beats C++
@heco.
@heco. 14 күн бұрын
so like rock paper scissor
@rusi6219
@rusi6219 14 күн бұрын
Actually Rust curls up into a corner and cries.
@arson5304
@arson5304 14 күн бұрын
​@@rusi6219 why
@rusi6219
@rusi6219 14 күн бұрын
@@arson5304 because of its atrocious userbase.
@huistelefoon5375
@huistelefoon5375 14 күн бұрын
​@@arson5304afaik Rust is barely used in enterprise software, and it is significantly higher level. the comparison of C, C++ vs Rust is questionable
@paladin80lvl
@paladin80lvl 14 күн бұрын
на сдинозавры пишут тыче бле
@debooger
@debooger 14 күн бұрын
c++ nuuuuuu you fell off lmao
@ron3060
@ron3060 14 күн бұрын
Cpp= C+Class 😎
@nirajandata
@nirajandata 14 күн бұрын
sorry, this terminology was only valid upto c++98
@dutchdykefinger
@dutchdykefinger 13 күн бұрын
fuck classes i only care about the namespaces templates can be handy in a pinch too :D
@valizeth4073
@valizeth4073 13 күн бұрын
@@nirajandata Not even then really, it was only valid around 40 years ago when C++ was still "C with Classes" and still transpiled down to C.
@thsposito
@thsposito 14 күн бұрын
i was hooked, and than all this bs about scripting languages not being actual programming languages... too pendantic. bye
@FlanPoirot
@FlanPoirot 14 күн бұрын
u won't be missed
@ElPikacupacabra
@ElPikacupacabra 14 күн бұрын
He's joking. He programs in a bunch of languages, and makes the same sarcastic statements for all of them.
@user-gh4lv2ub2j
@user-gh4lv2ub2j 14 күн бұрын
Sometimes?
@lukefidalgo8154
@lukefidalgo8154 11 күн бұрын
no
Drawing Graphics with C and Windows API is Easy
5:17
Nir Lichtman
Рет қаралды 26 М.
Ryan Dahl introduces JSR at DevWorld 2024
29:13
Deno
Рет қаралды 77 М.
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 47 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 2,3 МЛН
КАХА и Джин 2
00:36
К-Media
Рет қаралды 3,8 МЛН
OOP in Pure C
2:00:13
Tsoding Daily
Рет қаралды 51 М.
Newton's Method in C
1:33:17
Tsoding Daily
Рет қаралды 17 М.
Why I Like Programming in C.
3:16
Francisco Jinto Fox
Рет қаралды 15 М.
My Own 3b1b Animation Engine but in C
2:06:44
Tsoding Daily
Рет қаралды 53 М.
Interview with Sr. C Dev | Prime Reacts
6:52
ThePrimeTime
Рет қаралды 305 М.
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 74 М.
This is better than TempleOS
1:55:21
Tsoding Daily
Рет қаралды 52 М.
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 347 М.
My Initial Impresson Of Go
12:39
TheVimeagen
Рет қаралды 59 М.
Wow AirPods
0:17
ARGEN
Рет қаралды 1,2 МЛН
Добавления ключа в домофон ДомРу
0:18
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,8 МЛН