Пікірлер
@xl000
@xl000 Күн бұрын
I try to always include some Boost Spirit and Phoenix in my programs so that I am the only one who can maintain them.
@lazyh0rse
@lazyh0rse 5 күн бұрын
I made a few projects in nim, I wouldn't recommend building anything for production imo. It's too unstable. I usually rebuild my important projects in go and they work far far better in terms of stability. I don't know what makes nim unstable, but it just is for some reason.
@EdKolis
@EdKolis 8 күн бұрын
Does C++ not have IDEs that can tell you what auto actually means? Because C# and Kotlin have the same thing with var and everyone uses it.
@EdKolis
@EdKolis 8 күн бұрын
Boomers would say "congratulations on optimizing 0.00032 CPU cycles, that earned me a promotion back in 1972!"
@suhasanimation6193
@suhasanimation6193 8 күн бұрын
When I was a kid. Which is few months ago I thought "Python is the best programming language and functional programming is the best way of programming."
@lagz89
@lagz89 9 күн бұрын
bjorn starsoup
@Kavci034
@Kavci034 10 күн бұрын
2:54 std::optional exists
@Omnis2
@Omnis2 12 күн бұрын
As a layperson trying to learn CS and programming, I can't tell you how confusing and horrible almost every video on the subject is. People with knowledge just say things and use terms taking for granted that people know what they're talking about. Things only made sense to me when I started reading SICP. I still have a hard time understanding even the basics of OOP and Imperative programming. FP just makes so much more sense as the natural way to think through and then compute something, to my brain. For the car example, wouldn't you just have a map of Car and update the key pairs as miles, hours, etc accrue? Then you could pass the map through your Needs-maintenance? function for whatever target value you'd have associated with the miles key.
@desertxghost632
@desertxghost632 12 күн бұрын
To be honest I only agree on the auto keyword as it make the code less readable from standpoint of giving the code to someone to continue doing stuff on it however I don't see it handy unless u is using lambda fn. All other problems u mentioned can be described gently by saying its not beginner friendly or as they say "skill issue"
@snuffinperl8059
@snuffinperl8059 14 күн бұрын
Regarding your remaks on auto: IMHO the usage should be banned for the reasons you state and in addition to that the IDE can hide the exact type as it does for #IFNDEF paths which are not used and also for code passages not used #IF 0 ... as todays IDEs have clangd support we can do so many more interesting things. Like: jump to the definition/declaration of a type using the compiler instead of an overlay as we did in the past.
@snuffinperl8059
@snuffinperl8059 14 күн бұрын
I like your video, good work! No PM in c++ like pip/cargo stems from two issues: No standard build tool like CMake and huge money driven interestes to split the market: Microsoft vs. Unix vs. Linux. The PMs we have nowadays like vcpkg ignore best practices of the Linux platform (dynamic linking) and not too long ago boost did not even ship CMake files. Expect the c++ renewal by shipping rust instead. Is c++ worth learning: depends on your interest, if you want to do legacy code management (there is a lot of money in that) or if you want to develop new software, then you better look into more modern alternatives like rust/go/haskell and of course python. Regarding the linker issues, you are spot on, today i consider dynamic linker as a thing of the past, we can do in memory deduplication and other tricks to save memory. Given there is no libc back comaptibility on linux is a huge miss and made docker thrive. The only solution i currently see is cosmopolitan (justine.lol/cosmopolitan/) and in the long run some major player as Valve to force a stable libc interface on linux. So far, the only option was to recompile software to fit into the new environment but that is not possible if you distribute binary only.
@nicholaskomsa1777
@nicholaskomsa1777 18 күн бұрын
the problem at hand is that you aren't particularly talented at C++ and should not criticize what you barely have ability to use properly. I'm not going to write a video rambling on about how bad I am at python. I could, though I'd find it weird to do, and I would have to use ChatGPT, of course. But I won't, because I know jack python.
@bendavoka6467
@bendavoka6467 18 күн бұрын
Almost always there's a trade-off choosing/using something over/instead something else. Here e.g. performance ;) With C++, you need to know exactly what are doing, and that's what all lower-level languages are about. With python, things are easier and that's one of the main reasons higher-level languages were created. I think C++ maintainers have been trying to create a best-of-the-both-world situation for the past decades. But still, you need to know what you are doing e.g. understanding pointers as in C language, then using smartPointers is probably like the choice between different vehicles to take you from A to B. I am not a skilled programmer, but I'd rather spend hours to learn and build something with C++ than using languages like python. I still use python from time to time, don't get me wrong. It is a rich language and easier to use - but not for major projects.
@RooterDelWifiXs
@RooterDelWifiXs 19 күн бұрын
Which theme is this tho?
@3arabiWalBanate
@3arabiWalBanate 19 күн бұрын
I agree with you, the C++ need : -Dependency management software like composer for symfony and this software need to make us agree for a general struct of C++ project. - New STL with simple syntax - GTL graphique librairie with many widgets and matériel design - Modern Editor design like figma with IA commandes proposition - of corse under MIT licence
@lukagarner
@lukagarner 20 күн бұрын
This video is not a great criticism for modern C++! Bad practices of nice features will always be a thing, no matter how great something is, you will almost instantly see how it can be mishandled and that's fine. Perhaps you wanted to speak specifically about the bad practices, in which case, it would be nice to see a different title on the video.
@ControlProblem
@ControlProblem 21 күн бұрын
You've never had a problem with cyclic references because Python has a garbage collector in addition to the reference counting.
@vasyatka760
@vasyatka760 22 күн бұрын
I don't see any problems with auto keyword, you just hover your cursor over auto variable name in VS and it shows it's current type. And I bet other IDEs on other platforms could do the same thing. I never had any issues in situations when I need to check a type under auto keyword. It really looks like you are mere python programmer, you worked with C++ episodically, you show horrific code that consists of some horrific constructions like <<<>>>::foo<bar<some>>::{}([]) but you can actually make code much more readable, such things is not used very often, this constructions are mostly used in lower level abstractions. C++ is a powerful tool that is designed to be as it is now. Only python programmer could say something like "Package manager" for C++. LMFAO, PACKAGE MANAGER FOR C++, why do you need this? This is literally impossible, this is not cross-plaform language, for example on linux systems package manager for C++ is system package manager itself, what else do you need? On windows it's nuget or something else you decide to install to use as a package manager. It feels like you don't really understand what are you talking about.
@bamadoescode6242
@bamadoescode6242 26 күн бұрын
I think ill just stick to c
@MrTerribleLie
@MrTerribleLie 28 күн бұрын
Bah, modern C++ is fine.
@LyubomyrSemkiv
@LyubomyrSemkiv 28 күн бұрын
You problem with C++ is that this is professional tool for professional, industrial grade work. In other applications it is just odd, frustrating experience. If you think of this tool as just a professional tool but not a thing for "coding" this is a really reasonable and good tool for a job.
@blackimp4987
@blackimp4987 Ай бұрын
the issue is that C++ should have NEVER being modified to look like stupid interpreted languages or delusional Apple wannabediverse language as swift. It's pathetic what they've done and it's in line with the sticky ideology for dumb and weak minds spread by globalism. C++ syntax has always been perfect, clear and logical, at least until 14 . The more they went on trying to make C++ a language idiotproof the more they've destroyed it and destroyed the reason one should ever use C++. It's harder to read, illogical, unclear. Compact writing is useless. Professional coding requires you understand clearly what you are reading it, wether for developing or for fixing. Editors are meant to save you time at digiting and compilers are meant to compact code. Only unemployed linux nerds like to write incomprehensible code. You rather have compact binaries if you are writing firmware not code. I've used auto a couple of times for saving time required to wrtie something like "std::map<unsigned int, std::vector<double>>::iterator ..." already forseeing the issue I would have and infact I got back as you can't remember the hell of data structure you are dealing with and in other case when you have to deal with math you want to be sure compiler doesn't convert in the "wrong" type. By the way the more you need performance as in videogame the less complex you want your language and binaries resulting from compilation. 98 is still a viable version for videogames. The problem is that Stoustroup needed to be a part of this new idiotic fairy tale globalist world and decided C++ should become a language for those who know nothing about how a cpu works. so many people coming from scripting wanto to give opinions on a language meant to give full control on memory but they don't know what they are talking about, what to do with manual memory managing and never have to worried about performances or efficiency. Basically they are NOT cpu programmers but scripts writers. The same for those who come from Java or C#, the latter having interesting features despite I don't like not fully compiled languages who cannot even figure out why multiinheritance would be damn useful especially in mobile apps when a class is at the same time a view and a data structure exchanging data with internet. the object should be called asyncronously from the net and then having to modify a view and at the same time the view can be manipulated by user and have to dosomething on the net. so you have to do dirty coding as work around or break the simmetry and put an object of the kind exchanging data with net inside a view object or viceversa. The only real thing I feel I miss coding in C++11 is something like Java interface as an abstract class conceptually should be used for something a little different thou it works the same. By the way fortunately I don't see many sw written with Disney's rainbow C++.
@KX36
@KX36 Ай бұрын
here is one argument, in isolation, for auto. stops accidental expensive or incorrect implicit conversions.
@KX36
@KX36 Ай бұрын
this is just the tip of the iceberg. the things in this are reasonable things that people use from C++11, what about all the newer features in C++20 and C++23 that have just the worst API that it would be possible to design and which basically nobody uses; like modules, coroutines, concepts, mdspan etc.
@MrHiiii5
@MrHiiii5 Ай бұрын
A lot of these gripes sound like skill issues or bad principles on the programmers part. Take auto functions for example, this would get broken down at compile time but should never be done precisely because it defeats the principle of a strongly typed language. If the type of an auto cannot be deduced on the line it is declared it should be typed. I completely agree with the stl statements, they should be avoided in favor of much stronger, more maintainable solutions. There is nothing worse than a debugger diving into the templated nonsense that is the stl, it was made to be as generic as possible, and in my opinion to its own deficit. C++ often comes down to rigid design decisions that deeply impact your code, and is where most of its pitfalls arise. Do you keep your code exceptionless? Do you use lambdas or std::function? Is it _varName, m_varName, or m_var_name? Just some things to think about, it’s hard to say if there is a gospel of how to write c++ other than the dogma of “just use boost”.
@_-deep_a_b.862
@_-deep_a_b.862 Ай бұрын
3:04 worst part dudeeeee
@scaptal
@scaptal Ай бұрын
Gotta be honest, it would've been nice to hear a bit more about why their package manager can do more then others, cause now I know it can use arbitrary packages from links, which most package managers can do, albeit with maybe a few commands, but what makes nimble more flexible/special? Can it also use c++ or js libraries in ním or something?
@roz1
@roz1 Ай бұрын
Cpp is worth it 100%
@kingpic
@kingpic Ай бұрын
C\C++ isn't for everyone. stick to your python.
@tsunningwah3471
@tsunningwah3471 Ай бұрын
j😊
@Oaisus
@Oaisus 2 ай бұрын
After using it for a few years you learn what causes what incomprehensible error message. They make perfect sense in the context of the template spaghetti that is the STL it just takes a while to be able to correlate what broke in the templates with what you actually did in your code.
@TheNovakon
@TheNovakon 2 ай бұрын
3:27 really? printf in C++? Stay away. Dislike.
@ehtishamullah7534
@ehtishamullah7534 2 ай бұрын
Title is misleading
@lollertoaster
@lollertoaster 2 ай бұрын
C++ has a default package manager, it's called `pacman` And obviously C++ needs to be compatible with C, the main and perhaps only reason to use C++ is because you can use all the C library and write "C" libraries in C++. Every single programming language expects C when loading a dynamic library and C++ can be wrapped in C to provide this interface while still allowing all the high-level features.
@elkvis
@elkvis 2 ай бұрын
Geez, whine a little more
@ciscoserrano
@ciscoserrano 2 ай бұрын
For your car maintenance example, a functional way to deal with that is to capture the state of a car through a closure. Here’s a sudo code example for the homies: ‘’’ function make-car(make, model) { let mileage = 0 let carMake = make let carModel = model return(message) => { match(message) { case make: return carMake case model: return carModel case milage: return (miles = 0) => { milage += miles return milage } case default: return Error(“unsupported message”) } } } let car = make-car(“Toyota”, “Tacoma”) print(car(make)) // > Toyota print(car(milage(10))) // > 10 print(car(milage(5))) // > 15 ‘’’ The make-car function returns a function that lets you modify its captured state. In other words, closures can behave like objects because they are objects. *mind-blown.gif*
@Wyklepheph
@Wyklepheph 2 ай бұрын
Meta programming in Nim is amazing. I helped add authoritative server functionality to an RPC library written with Nim. You just tag the procedure you want to call remotely with a pragma and the macro rewrites your function to add connection objects, and adds boilerplate to your code so that it CAN be called remotely. None of the complicated stuff is exposed to the programmer and you can set up networked games with authoritative servers crazy easy. It’s my favorite language by far and am amazed it’s not as popular. Oh I also wrote a macro that generates HTML from Nim language constructs (syntax things), so you can mix in Nim code to generate dynamic HTML. You get error checking and syntax highlighting bc it’s all Nim. Works wonders with HTMX. You can bend the language to your will in ways that feel unnatural. I recommend ppl join the discord if they’re interested, and stick to it bc if you’ve only ever done programming in python there are some things you’re gonna need to learn to get comfortable.
@zeez7777
@zeez7777 2 ай бұрын
Some valid points in there but for the most part i think its just a skill issue
@user-vc2pm5xv7s
@user-vc2pm5xv7s 2 ай бұрын
I struggle more with what the hell the type is in python 😅
@ZihadJoy
@ZihadJoy 2 ай бұрын
after coding in c++ for more than 1.5 years i can say that im a beginner in c++, there's wayyyy too much to learn
@PiotrPilinko
@PiotrPilinko 13 сағат бұрын
After using c++ over 20 years in professional work (well, together with C, java, C# and more), I'm still aware that I need to learn a lot.
@JonathanPlusPlus
@JonathanPlusPlus 2 ай бұрын
Modern C++ are for the nerds and research teams basically....no one writes modern C++, in the sense of making those one liners using filter, pipes, ranges etc you were talking about. If you are working as embedded dev you will use C++98 ~03 or even C with classes...and as a software dev you wont go higher than maybe C++14, C++17...I mean, you can forget about using all this fancy stuff at work. If you are using it, I promise you that you dont follow the coding guidelines presented by your company, unless it's your company. If you get to a coding interview and solved some problem using filter, pipes, ranges etc - I can promise you that they will ask you 1) to explain your code and 2) solve it using "traditional" C++. PS: Don't confuse my use of "Modern C++" with smart pointers or auto...
@Daekar3
@Daekar3 2 ай бұрын
I feel like both of these are too far in either direction. A proper language should support procedural, functional, and OOP techniques. Each makes sense depending on what you need to do, and shoehorning every need into some specific paradigm makes no sense. Even in something old and primitive like Visual Basic, you can put together structures that employ all the techniques as necessary to keep things logical and readable. Objects for object things, functions for function things, procedures to tie it all together. I don't see why this has to be so hard, really...
@janwilmans5954
@janwilmans5954 2 ай бұрын
hey, you don't like auto, don't use it. "the poor naming practices _of many programmers_" is not a reason not to do better. Using auto allows you to program against the interface of the type rather then the concrete type, with makes refactoring much easier. Ranges, you don't like it, don't use it, the example is convoluted and a very poor use of ranges where it was completely unneeded and that why it looks so bad. Segfaults tell you _exactly_ where you program crashed, build in debug configuration and use a debugger. You seem to think that because there are many ways to do something, you must know and use all of them, just like python, there are many way to accomplish something and as you mature as a developer, you know what to use when. All in all, a weird summary, and a non-matching description in the title.
@patlecat
@patlecat 2 ай бұрын
For decades languages claimed to finally replace C++, none have so far. Seems it's nothing more than a marketing or sales pitch that everyone uses.
@wilsonnetoms
@wilsonnetoms 2 ай бұрын
Truly understandable but my thoughts on some of the points made: 1:05 - What is someRandomFunction? Nowadays everyone is using an IDE so it's pretty easy to check the function signature 2:10 - Transforming imperative code to functional-like code has its benefits. It is easy to read once you practice and get used to this paradigm. Just write good unit tests and rarely there's a need for debugging..
@greg77389
@greg77389 2 ай бұрын
_Python coder attempts to understand C++ challenge_ (Impossible)
@nevemlaci2486
@nevemlaci2486 2 ай бұрын
The segfault part is just not true, core dumps and debuggers exist...
@adicide9070
@adicide9070 2 ай бұрын
there is unfortunately no momentum behind this language. and it's all because of the 2space indent.
@Derian_De_Grey
@Derian_De_Grey 2 ай бұрын
? Отступы могут быть любыми. Можно и 4.
@Caspar__
@Caspar__ 3 ай бұрын
Funny how you say you are a python dev and then complain that you cant deduce return types when auto is used.
@kishirisu1268
@kishirisu1268 3 ай бұрын
Stl is not a problem if only all used it but no, every dev studio makes their own stl implementation, because vanila stl is garbage. Just think about how many string/vector implementations reinvented just to replace original stl.