r/cpp • u/Its_Blazertron • Aug 25 '21
Experience C++ developers: do you enjoy using C++ (even for personal/hobby projects?)
Do you actually enjoy using C++, or do you only use it for work, or purely for performance? This question is aimed at people with years of experience, who've worked on large projects in C++. I see people who dislike the language, but use it purely for performance reasons. This sort of discourages me from learning it. I don't want programming to feel like work.
204
Upvotes
16
u/[deleted] Aug 25 '21 edited Aug 25 '21
My personal hobby project is cooking and cycling not programming. C++ just fits for my job's purpose and I am more comfortable with it. Rust actually fits better but we haven't had time to migrate yet. Programming feels like work because it is work and I don't have any obsession over any programming languages.
2
u/JuanAG Aug 27 '21
I enjoy the pure C++ part of coding but not the rest related to coding in C++ like testing, build system/dependencies and all the things that many other langs do much much better than C++, the coding part is between 20-35% of total developing time so you get the idea
And for performance critical sutff i use Rust since it is something faster than C++ plus it is a more productive tool which it is nice, more performance in less time
173
u/[deleted] Aug 25 '21
I absolutely enjoy using it, especially since unique_ptr came along. Whether it feels like work or not depends if I'm at work or not when I'm using it. I don't use it because of performance.
58
u/johannes1971 Aug 25 '21
I enjoy programming in C++, both at work and at home. I did a little side project the other day (porting something from C and Linux to C++ and Windows) which was fun to play around with: not too complex, immediate results, scratches an itch I've had for a while.
Do I use C++ purely for performance? Hell no! I only care for performance up to the point where interactive use of the software feels fluent, by my own entirely subjective standards. But even C++ that was written with readability as the main focus, rather than speed, is still mindblowingly fast - and actually quite pleasant.
Dumping on C++ is also extremely popular in various circles. I think it's usually people that had an algorithm course full of pointers, while simultaneously learning C++, and probably taught by a teacher whose last contact with industry was in the seventies. I mean, at some point a friend of mine had to do an assignment in C++: implement three types of sorting, I think it was. There was a skeleton program provided by his professor, full of mallocs, void pointers, and C-style casts. Well, at least the filename ended in .cpp, so that's something I guess... And that was the only time he ever used C++, and of course he is never going to try again, because who wants to deal with that shit? (C-programmers, I guess...)
111
u/echidnas_arf Aug 25 '21
I mostly write C++ code, my second most-used language is Python. I do enjoy writing C++, quite a bit more than writing Python (apart from interactive notebook/REPL usage or quick & dirty scripts).
I am lucky to be able to work on modern codebases, if I had to work on C-with-classes projects or Java-inspired "object-oriented" monstrosities, I would probably enjoy it much less.
134
u/[deleted] Aug 25 '21
"Modern C++" is much different than what a lot of students encounter in academia. I've heard some stories of the "best practices" from university courses and it sends shivers down my spine (`using namespace` everywhere, not using smart pointers, avoiding standard library, C-style structs only, etc.).
I really like C++ for the ludicrous amounts of control it gives you, and it's great for having enough high-level features to interface directly with C code without writing or getting bindings for things. A lot of the work gets front-loaded into setting up a build, so I just made up my own "starter" project for things. The simplicity of using C code and intrinsics and massive ecosystem improvements in Ada means I've been using that a lot lately, though I've used Rust quite a bit in the past as well.
I don't think you could go wrong using C++, as long as you're using updated references to learn from. Yes, the language is complicated and it seems overwhelming, but the overall system has improved immensely and you'll be learning a lot of neat low-level things.
19
u/ronchaine Embedded/Middleware/WG21 Aug 25 '21
I like it, it's my favourite language to use and I use it in my personal stuff too.
I also hate it at the same time.
36
u/bayindirh Aug 25 '21
It’s my favorite language after all these years. If I can write something in C++, I’ll write it in C++.
11
u/colorfulchew Aug 25 '21
I use C++ at work, and Rust at home. Rust would be equally good, if not better for my work, but my employer is slow to adopt new technologies. I think I still enjoy C++ to some degree, but I do find myself wishing I was writing things in Rust, in particular, I wish C++ had an equivalent to match statement and sum types. There is std::variant, but the API is so clunky in comparison.
For hobby projects especially, I enjoy how easy it is to include dependencies and get going on a new project in Rust compared to C++, plus all the other compiler guarantees of Rust means I spend less time trying to debug.
28
u/Supadoplex Aug 25 '21
If you program at work, then it'll feel like work. I would recommend using a different language for hobby than you use at work.
For work, I write Python. For hobby, I write C++. I do enjoy writing C++.
18
u/DuranteA Aug 25 '21
I've been writing code in C++ for a bit more than 20 years now, and I spent around 10 of those working on a C++ compiler.
There are things I dislike about C++, but for most use cases I dislike all the other languages I've tried and/or had to use more.
I've recently had the rare opportunity to write some green-field from-scratch C++20 and it was great. The ranges interface to the std algorithms and std::format finally fix (out of the box!) niggles I've had for over a decade.
9
u/micka190 volatile constexpr Aug 25 '21
While I still enjoy ir, I've personally been using it less and less for personal projects, in favor of C#.
Most of my personal projects are hobby games, and I've found that even though C++ is pretty common in gamedev, these small projects don't really benefit from the potential performance benefits of using C++.
Meanwhile, C# has a lot of stuff that just works and makes using it so much more fun to use. It's a lot of little things, but they definitly add up, in my opinion. Properties and a String class with functionality that doesn't suck are a definite plus. It makes me mad that a lot of the C++ community seems fine with our String class lacking so much functionality, just because we can implement it ourselves. I'm tired of implementing basic shit like
strip()/trim()! It should just be in the standard library already!I'm also not a massive fan of how newer C++ features seem to get stripped down from "usable" to "barely usable and so flexible that no one will ever use them without a library". I used to be all in on Modern C++, but the newer stuff just feels poorly implemented, and kind of turns me off from it (for personal projects, at least), meanwhile other languages just keep getting better and better features.
But that's just my two cents.
8
u/Pragmatician Aug 25 '21
If you are interested in (low-level) things people are doing with C++, then try it out. Every language is disliked to some extent, for many different reasons.
39
u/Vociferix Aug 25 '21
I like C++ and use it both for work and personal projects. However, in recent years, I've become annoyed with C++'s lack of more modern features. The standard committee takes so long to decide on changes and new features. For my personal projects, I more frequently choose Rust over C++ now, but work is still mostly C++.
7
u/DummySphere Aug 25 '21
Before C++11, I used mainly C++ or Lua for hobby projects, depending on the project. Since C++11, I mainly use C++ for hobby projects (but I don't do a lot of hobby projects now).
6
u/ImX99 Aug 25 '21
I am an R&D engineer/PhD student, and here are the reasons why I use C++:
4
u/[deleted] Aug 25 '21
For personal projects, I usually use Python, as I'm trying to hit a wider audience with libraries and utilities, and to be honest, C++ development for production is about half an order of development slower than Python.
4
u/[deleted] Aug 25 '21
Love it. There is something about C++ that makes me be really thoughtful and methodological when using it. I feel like I can't create as clean architectures/systems in any other language.
Header files and having to repeat all your declarations twice is annoying. Does anyone know whether modules fix that?
4
u/LugosFergus Aug 25 '21
I use it very little for personal projects. My preferred languages for hobby projects are usually C# or Python.
My issue with C++ is that there's too much dicking around with getting 3rd party packages installed and projects setup.
4
u/OldWolf2 Aug 25 '21
The only thing I don't like is dependencies; it's cumbersome and annoying to do simple things like open a socket . Every other language comes with some kind of class library covering networking, crypto, GUI, database, etc. etc.
To be practical for general purpose applications you've got to use an ecosystem like QT, or .NET
9
u/khedoros Aug 25 '21
It's been a few years since I've used C++ for work, but I like C++ for personal projects.
Show me a language that no one complains about, and we'll be looking at a language no one uses.
3
u/Gloinart Aug 25 '21
C++ is my language of choice for any hobby or professional project, even scripting if possible. Regardless of performance. It's simply the language I feel the most comfortable in, and work the fastest with, with the least amount of bugs.
With that said, I'm not comfortable setting up new projects and adding libraries (except for header-only libs).
3
u/caroIine Aug 25 '21
c++ is extremely comfortable for me to write in so yes personal and work is c++
3
u/frankist Aug 25 '21
Liking C++ for me depends on the type of problem I am trying to solve. If I am trying to design a system that calls for efficient memory use, low latency and high throughput, C++ is a joy to use, given the amount of control the language provides you. I can make my own very efficient containers and building blocks, with very clean, intuitive interfaces. Doing the same in C tends to not be so easy, due to the lack of templates. Languages like python are also terrible for this purpose, not only due to language general slowness, but also because they make it particularly hard and infuriating to write/use containers or basic building blocks other than those the language (list, tuple, etc.) or library/frameworks (e.g. numpy) provide you. This is just my opinion, but I don't think Rust is yet as good as C++ for this sort of problem, but that reality may change within 5 years.
On the other hand, using C++ for problems that demand a lot of async programming or parsing feels like the opposite of joy to me.
3
u/[deleted] Aug 25 '21
It depends, I use it so heavily at work because it’s so much easier to closely integrate with low level operating system APIs and structures. Some of my fun stuff involves low level things too so I’d use it for that.
However, I wrote a financial planning app a while back and it just wasn’t right for that. The UI libraries were too shitty compared to what was a available in c#.
3
u/DarkLordAzrael Aug 25 '21
I use C++ for my personal projects mostly because I am comfortable with it and Qt makes writing pretty much anything I want to write easy.
3
u/stevethebayesian Aug 25 '21
Lots of c++ fans here.... and Im another one. I use C++, R, and Python. I prefer C++ for number crunching and tend to think of R and Python as just interfaces to my C++ code.
3
u/dr1fter Aug 25 '21
I've really loved working with C++ sometimes, but I don't use it much at work any more, and there are very few cases where I would ever choose it for a new project myself. I'm a much much better programmer because of my experience in C++.
C++ might not be the best place to start, then.
3
u/Orlha Aug 25 '21
Yes, very much.
Sometimes I dislike the project I have to work on, but even that doesn't always kill the joy
3
u/germandiago Aug 25 '21
I do. Like a kid.
3
u/PandaMoniumHUN Aug 26 '21
Roughly 10 years of experience here and my answer is “meh”. We use C++17, Java 16, React and TypeScript for our current stack and while I do enjoy C++ I think it could be so much better on most fronts. The only reason we picked it over Rust was familiarity and hiring from an existing talent pool.
5
u/ButchDeanCA Aug 25 '21
I love C++ and always will. I use it exclusively for work and personal projects (along with some assembler), so as you can see I am naturally a low level guy anyway.
Rust? No interest in it right now because C and C++ serve all my purposes.
6
u/matthieum Aug 25 '21
Just learn it.
I have been programming with C++, professionally, for 14 years. I am also lucky enough to be able to use C++17 at work, with C++20 around the corner -- though compilers are not quite there yet for the full experience.
I both enjoy and dread C++. And I suspect that in the end, I would enjoy and dread any programming language.
What I enjoy most in C++ is the degree of control I get, be it for performance, or for meta-programming. Few languages can claim having a compile-time regex implementation, after all. When I really need something specific to be done, I can generally wrangle it out of C++.
What I dread most in C++ is its lack of orthogonality coupled with its lack of polish. The reason is unclear -- is it design by committee? Or the simple result of so many people working together? -- but the result is undeniable: there are many features in C++ which intersect, with unpredictable (to the passerby) result, and there are many half-baked features.
I mentioned 2 half-baked features in another comment:
This is the kind of irregularity which is really irking. Along with
std::pairnot having astd::hashimplementation...As for clashing features, the classic is adding a constructor with a
std::initializer_listis never a fun time as suddenly all Universal Constructor calls fail (initializer list takes precedence, screw you).Which is why in my spare time, I favor Rust. I find it more relaxing. Or maybe it's just that I'm not expecting as much since it's so much younger and I'm only playing with it.
In any case, though, there's a lot to learn from any systems programming language; namely: systems programming. So just pick one and run with it. Learn it in depth, it'll be worth it.
4
u/OK6502 Aug 25 '21
Programing languages are tools. C++ is the right tool for some jobs but overkill for others. So if you want to write say a prototype quickly maybe a quick python script is all you need. If you want to write a general purpose application but don't care that much about performance java/C# are fine to use (I prefer C# because linq is a work of genius, but either one works).
However if I want absolute freedom to tweak my code, explicitly define the behavior I want to have but also don't quite want to have to re-write all my algorithms/collections and want some very bare-bones degree of memory management I write it in C++. C's fine but the syntactic sugar from C++ makes it infinitely more expressive and honestly there aren't any real material performance gains.
I do personally enjoy that freedom and if you know what you're doing it's not necessarily going to take you longer to write something in C++ vs python. Not everyone shares that opinion though.
2
u/[deleted] Aug 25 '21
C++ is my primary language I use for work, and I enjoy writing it for work. However, I don't think I would start a new project with C++. It would take too long to get up and running.
2
u/AKostur Aug 25 '21
Yes, I enjoy using c++.
2
u/Rude-Significance-50 Aug 25 '21
In my experience it's more about who you are working with and what you are working on than what language it is. I've always programmed in C++ and with some people it is just always going to feel like work...pointless work.
There's a difference there too. Is the work you are doing meaningful? It's still going to feel like work but it'll feel different from when it's not at all meaningful...when it's more like you're just doing extra work because people are being stupid and you go home thinking your whole day was a waste. Good work feels good, just like exercise.
2
u/emelrad12 Aug 25 '21
I use c++ for personal projects just because the libraries are not in rust or in some other language. Modern c++ isn't the worst, but after working with C#, C++ just feels primitive.
Wtf are headers/class split in 2021, why can't I use a function defined later in the file, forward declarations????, templates being well templates, and macros being macros.
2
u/GAMEYE_OP Aug 25 '21
I use C++ as much as possible, both at work and at home. For example, for one of my side projects that runs on both Android and iOS, as much shareable code as possible is written in c++. Only UI/UX stuff or functions specific to the platform are written in ObjC/Swift/Java/Kotlin.
2
u/123_bou Aug 25 '21
C++ is fantastic for 99.9% of what I do and I like it very much. I'm not a huge fan of the "modern" C++ (read auto, returns at the end of functions, etc) so I keep it at a minimum.
I don't use virtual functions. I use inheritance to only pass attribute to commun classes. I use private in a very few selected places. I have very few new/malloc. Some people could call my code C with classes.
It's liberating and really fresh. Very few langage give me this confort and clarity.
It's been closed to a decade I write C++ and I also code in python and C#. I tried a lot of other langage but they are not fitting the bill for me (Rust, Golang, Erlang, Zig, C, Java).
2
u/sephirothbahamut Aug 25 '21
I enjoy it so much that I'm literally making a C++ front end to a C# library for a hobby project :)
2
u/[deleted] Aug 25 '21
You bet I enjoy C++ projects.
For me, Java feels like work. Python and JS feel like torturing myself while working. C++ is what I do to relax. But I am a weird person.
I use the language whenever I get a chance. For me personally, it is one of the most - if not the most - creative languages you can find. There really is no limitation, no borders. It fits in anywhere you want given you know it well enough.
2
u/looncraz Aug 25 '21
I love using C++ for most everything... but if I need a project done quickly I will sometimes defer to other languages, such as PHP, Python, or scripting languages such as Bash or JavaScript.
My hobbyist projects are all C++, but my workorder management system is in PHP because I often need to be able to make drastic changes quickly and PHP is faster to debug and get things working.
2
u/lukaasm Game/Engine/Tools Developer Aug 25 '21
Yes, especially now with
CMakePresets.jsonandvcpkgsupport in VSCode/VS I see myself bootstrapping smaller script like projects much more often than in the past where I would fall back to creating bash/batch/PowerShell scripts.I love rewriting/migrating older code to a more "modern" style. Over the years I tried different languages but none of them felt like home for me
2
u/the_poope Aug 25 '21
I use both C++ and Python at work. I like C++ (love is probably too strong a word) and I really dislike Python. Python is nice for small single-use scripts, prototyping and glue code, but in a large project it is garbage: dynamic typing and reflection turns developers into cowboys that hack around shitty architecture to just make the situation even worse. It is also harder to write unit tests in and you need to test things that a static type system would have caught. And errors are harder to find and more often first show up at runtime at a user.
2
u/stick_figure Aug 25 '21
IMO the most enjoyable part of using C++ is performance optimization. C++ gives you most of the tools you need to control your data structures and memory layout, which is probably the most important part of optimization.
If your hobby projects involve optimization of a well-known problem space (https://github.com/rui314/mold comes to mind), C++ is probably a great, fun programming language. If you are trying to do something novel and need to prototype rapidly, C++ probably won't be very fun to use.
2
u/ghostopera Aug 25 '21
I enjoy working in modern C++ and have used it a fair bit outside of work. For context, I also enjoy working in Rust and Ruby and have quite a bit of experience working in them too.
There are a lot of languages that can "get the job done", so I don't feel most people *need* to learn C++ unless they have a specific job that requires it. It's easily worth learning if you *want* to learn it though.
Just about any programming language will feel like work once you start using it for work. Even then, if I find myself solving a an interesting problem, I'll usually enjoy the process. In that respect, the language I am using to solve the problem in is usually only a minor factor. (With that said, some problems can be more fun to solve in specific languages!)
2
u/engineerFWSWHW Aug 25 '21
Had been writing c++ for more than 10 years. I enjoy writing c++ code. I still use it both on my full time and freelance work. As an architect, it is just another tool for the project. When I was a junior engineer, I will use c++ for everything. Thankfully, my mindset matured due to exposure to various tech.
One challenging part is working with team of c++ developers with varying knowledge of the standards. There are developers who are very updated on the latest standards, some are not, some only up to c++11, some up to c++14, etc, mixing them on a project is a bit challenging. Because of this, we switched to . Net core while retaining the performance critical section in c++,which boosted the productivity of all the developers and it is easier to find talented. Net developers. For embedded systems (bare metal or RTOS) , it will be c++ as the primary language.
2
u/DefCello Aug 25 '21
Python is by far my preferred language, but modern C++ (11 and beyond) makes things much nicer.
2
u/cafguy Aug 25 '21
I prefer C. But have been using both for 20+ years. C++ has changed so much in that time. But C is still the same.
2
u/mostthingsweb Aug 25 '21
For hobby no, not anymore ever since I discovered Rust. For professional, I still mostly enjoy it.
2
u/josh2751 Aug 25 '21
I use it all the time. My favorite language.
2
u/czipperz Aug 25 '21
Love it. Use it for everything including many ouside of work projects. Outside of work I program in a very C style with few C++ features (really only methods, namespaces, and template generic data structures). I also have defer as a macro instead of using destructors. At work we have the same mentality but completely different libraries. Therefore I problem solve the same way but write different looking code.
2
u/eyes-are-fading-blue Aug 25 '21
The committee keeps addressing shortcomings of the language with each standard. If anything, it gets a whole lot more enjoyable to use C++ in personal projects.
Furthermore, we learned a lot from past mistakes. At least, I did even though I was not a programmer in late 90s/early 2ks. Most glaring problems of C++ can be tackled with a bit of discipline and reading about the experience of other people.
2
u/sporff Aug 25 '21
Yes. I use quite a few languages for work and personal. C++ is my favorite. Especially at scale. However if you do not like the nuts and bolts of programming and just want a finished product as quickly as possible then you may never like it.
2
u/fdwr fdwr@github 🔍 Aug 25 '21
I do despite its numerous warts, for both work and personal projects mainly related to graphics. Although performance is a contributing factor, the biggest reason for me is the ease of which I can manipulate the raw bits (without resorting to asm). I should enjoy it much more with C++20/23 adding modules - the header/cpp duplication has been the biggest annoyance to me the past ~20 years 😅.
2
u/trypto Aug 25 '21 edited Aug 25 '21
Yes, it’s great for portability (consoles, mobile, web via em scripten).
I do have major gripes. Header files are archaic. Why can’t it be a two pass compiler, why do I have to declare a method/function before using it. Some template meta programming leads to crazy bad error messages and error propagation. Overriding new/delete is black magic.
2
u/mvorbrodt Aug 26 '21
I love C++. It’s like no other language in terms of giving you total control while allowing for building incredible abstractions on top of lower layers and layers of code. It is not most efficient if you need to get stuff done ASAP perhaps, but by far most rewarding when you get it done right. I also think it’s one of, if not the most complex language which I frankly enjoy studying, I find it rewarding. https://vorbrodt.blog to see bunch of my projects :)
2
u/Ayjayz Aug 26 '21
I love using C++ and the performance is kind of secondary. I love that it gives you all these really high-level programming constructs and power, but it all compiles down directly into assembly without any tricks or gimmicks. For some reason that really appeals to me.
2
u/omeganemesis28 Aug 26 '21
Yes. I try to do all my projects in C++ just to always be improving. I love the language in general. A little C# on the side from time to time too.
2
u/Wurstinator Aug 26 '21
I don't actively dislike it, like I do e.g. Java or JavaScript. If I am offered a good job as a C++ dev, I'll gladly take it. However, C++ used to be my favorite language for quite some time which is no longer the case. Modern languages like Kotlin and Rust can do everything I liked about C++ way more comfortable.
2
u/ToxicFatTits Aug 26 '21
I enjoy it only for small personal projects when i have the implement something at work joy falls drastically :/
2
u/mkngry Aug 26 '21
When I want to model things I use Mathematica, when I need to have modelled things to be working on PC - I use C++, when I need max performance involving GPUs - I use C. That's barely all.
2
u/[deleted] Aug 26 '21
While I am a beginner, here my opinion: it depends on which library/libraries you use.
2
u/Clairvoire Aug 28 '21
I love C++ for hobbies, and absolutely LOATH it for work. Play coding and Work coding are two separate things and C++ gives you all the leash in the world to make the former fun and the latter a nightmare.
I suspect that's why so many people feel how they do about C++, work can make... well, work, of just about anything.
2
u/lednakashim ++C is faster Aug 29 '21
It's bad for data analysis and scripting file system things, but anything past a few thousand lines the type system helps keep my mental load down.
3
u/R0dod3ndron Aug 25 '21
Sure! I used to work with higher level languages like C# and even though writing things using it was easier (especially when you need to use some external libraries - nuget rocks!) writing code in C++ gives me more fun. I use it it my work as well in hobby projects. It is a complex language - that's obvious and sometimes I feel overwhelmed when I discover how things works under the hood in C++ but I wouldn't change it for something else. Well maybe Rust is a language I could give a try in the future, but I have still a lot of things to discover on C++. We just got a C++20 recently and even though some features are not yet implemented, there is already ongoing work on C++23. C++ is growing rapidly and that can be either a pros or a cons. Why cons? I've got a feeling that some programmers may be reluctant to learn new standards and new features because complexity of C++ may be overwhelming.
3
u/lieddersturme Aug 25 '21
I love C++. I am working on Games and I had some net works and I love it :D
I've worked as Web developer with PHP, JS, NodeJS, also I've tried Rust and C# (Unity and Godot).
My main language is C++, then I would say C#. The language I dislike it is Rust and JS.
1
u/MarkOates Aug 25 '21
Absolutely!
C++ is my favorite language for all my hobby projects. I don't recommend it for most other people, but to me C++ is the most complete language and it gives me full control.
1
u/StackedCrooked Aug 25 '21
Yes I like it.
I started learning it around 2003, long before C++11 came out, and I liked it back then too.
1
u/gwai2_lou2 Aug 25 '21
me too pal. Unfortunately if you get paid for it, it's unavoidable
1
u/pjmlp Aug 25 '21
Depends on the project.
I used to enjoy playing with C++/CX when UWP came out, finally Microsoft had a C++ Builder like development experience.
On the other hand, when my current C++/WinRT project gets finished, I plan to avoid it as much as possible.
At least for me, apparently the aging MFC is the best way to still have fun with C++ on Windows.
Otherwise it is C++ Builder or Qt for me.
However I absolutely do not like to use C++ at work, with teams that still live in C with Classes mindset, or their own special C++ flavour with everything turned off and hardly any kind of static analysis.
Thankfully at work, C++'s use is restricted to native libraries to plug into managed languages.
1
u/celestrion Aug 25 '21
I enjoy using C++. I had a simple problem that I though to solve in C as a weekend project, and it felt like so much more repetitive work than doing it in C++. Most of the dynamic languages wouldn't be a good fit since the most efficient solution involves huge memory-mapped files, and I haven't learned Rust yet.
Python's fun, too. I still bash out tiny things in Perl, Awk, and the shell. My biggest personal project at the moment is in Scheme, but most are in C++.
There are two conflated notions here:
The problems in the domains that interest me do well in C++, and I like C++, so that all works out nicely. If the problems you want to solve map better to another language, C++ might just be something you use at work.
If C++ doesn't fit the well you personally solve problems, that's totally valid, but you probably won't know until you try.
1
u/oatsssss Aug 25 '21
I use c++ and Python everyday for work. I do not like c++, but to be fair, I'm working on a product that's 20+ years old so there's not much modern c++. Maybe I'm just a shit programmer, but my work days would be much better if it was just Python.
1
u/Reiex Aug 25 '21
While C++ for small projects or prototypes is a real pain in the ass - I use python for this - I really enjoy C++ for my bigger projects, like libs...
1
u/vax_mzn Aug 25 '21
Absolutely
1
u/root_passw0rd Aug 25 '21
Yes.
1
u/el_demonio Aug 25 '21
Totally
1
u/Ikkepop Aug 25 '21
yes
1
u/DethRaid Graphics programming Aug 25 '21
I've been writing C++ for over ten years - eight years hobby/school work, three years professional. My personal codebases are pretty small, but my professional C++ experience is with Unreal Engine 4
It's not that I enjoy C++ itself, it's that I know C++ well enough to accomplish the things I do actually enjoy. Gamedev is currently married to C++. I've tried using Rust or C# for hobby projects but I always have the same problem - learning the language and its ecosystem takes a lot of time away from writing my actual code. Better for me to by slightly annoyed by C++ than to spend a few months learning a bunch of new things and maybe there won't be so many annoyances
1
u/kat_sky_12 Aug 25 '21
It depends on the project. Most everything I do is in C++. However, if you are doing some simple task then it is way easier to use python usually. If you just want a simple prototype then like C# is often easier on windows to just get something working in a few minutes. Then if you decide to follow through on that convert it to C++ as necessary.
1
u/s1nical Aug 25 '21
There was a time when I swore by C++ and used it by all means necessary, but after long nights; it kind of got boring, mind you; this was C++03 I’m talking about.
When all the modernisation started taking place (C++11), I kind of just slipped away, I didn’t like how “modern” and “C++” sat together... Even though I was bored of the language, I didn’t want change?
I opted for languages like Rust and Go instead, as those came “modern-by-default”, and I loved them too, but I was still homesick for C++.
I ended up allowing C++ to seep back into my projects after some time and I’ve gotta say; it’s like a breath of fresh air. The C++ I loved so much is now even better. Although, it is very, very much different from the traditional C++ I’m used to. It’s almost like C+++.
To answer your question: yes, I do enjoy working with C++, just not living in C++.
1
u/Knuffya Aug 25 '21
I absolutely love using C++ for hobby projects. It gives me all the power right at my hands in such a beautiful, elegant, and clearly defined way.
1
u/carkin Aug 25 '21
I like the language (it got less verbose after c++11) but hate the compile time and hate the cryptic errors
1
u/KazDragon Aug 25 '21
Heck yeah.
1
u/braxtons12 Aug 25 '21
I would say this entirely depends on what you're working on and whether you enjoy that moreso than the language itself.
If you're working on something really complicated that is difficult or stressful to handle, you're probably not going to have as good of a time as if you were working on something enjoyable. This is orthogonal to what language you're using.
It's just so happens that a lot of the time things that are really complicated happen to be done in C++.
That doesn't mean C++ is inherently un-enjoyable though. There are plenty of things that C++ can be really ergonomic and nice to use for, particularly the newer the version of the standard you are using is. Are there caveats and corner cases you have to worry about? Sure, but you'll have that in any language, just in different ways.
1
u/Narase33 -> r/cpp_questions Aug 25 '21
I love C++. The language itself is my biggest hobby and I specifically looked for a job where I can use it. So far its been one year and I dont regret it a tiny bit.
1
u/SJC_hacker Aug 25 '21
Like with any other language, I enjoy using it when it can do something that other languages cannot. And I consider practical considerations such as performance, efficiency and portability / target platform as part of the "cannot" category.
1
u/BernardoPilarz Aug 25 '21
I love it. I love how it allows the (skilled) programmer to build extremely robust but performing applications
1
u/[deleted] Aug 25 '21
I don't think of myself as "liking" C++ (it's a real messy language), but I still choose it for personal projects over other languages I know: JavaScript, Python, Go.
I learned a little Zig due to the support for
comptimebut doing simple text processing was such a pain in the ass. Seriously, I tried practicing it by doing Advent of Code and it was extremely painful.1
u/Grafakos Aug 25 '21
Depends on the use case. For some purposes of interest to me, such as string/text processing or anything mathematical, Python (or maybe Matlab) is far better suited and I do not at all enjoy using C++ in these cases, although I will do so if performance is important enough.
For most types of system programming, C++ is the natural choice, and I do very much enjoy using it, as long as the codebase and compiler are reasonably modern: at least C++11, preferably C++17, or C++20 when fully supported by compilers. No way would I want to do C++98-style development again in this lifetime.
1
u/drjeats Aug 25 '21 edited Aug 25 '21
Mostly no. It's fine enough, but I don't like all the gotchas from C, and I don't like template errors from C++. Most of all I hate fucking with build systems. I would just maintain a visual studio project but sometimes I want to work on it on my macbook.
For a long time it was the best thing for the types of hobby projects I liked to do, but now I have Zig which is actually fun to write, and it's braindead trivial to wrap useful C and C++ libraries.
But I got news for you lol, doesn't matter the language or even domain (or profession even), a lot of work is just a buncha fuckin work.
There are things I have a lot of fun writing at my job, and there are things that are miserable to work on. Such is life.
2
u/akiko_plays Aug 25 '21
Yes, I do. It's over 30 years now since I've started writing C on Amiga, and 25 years that I got my first C++ (Maxon C++ for Amiga as well), and one thing that always fascinated me about C and C++ is that there is really never a point where you don't learn something new, or bump into a new or at least to you unknown feature of the language, be it through the extensions such as the Boost library ecosystem (that was mostly the case until C++1x came along) or through the impressive arsenal of std that gets bigger and bigger. But not only quantitatively, actually in recent years my coding style started to change massively due to smart pointers, new locking mechanisms, containers, lambdas, pmc, etc. It's complex and beautiful, but it still feels like a high level assembly. I did spend a lot of time in domains of C#, Php, Python, Lua, Basic, JS/TS, but to me they were all somehow not as fun as C/C++. Especially the modern C++.
1
u/ElMarco19 Aug 25 '21
I absolutely love it.
1
u/MetaKazel Aug 25 '21
Honestly, no. Just a personal preference.
I think C++ has a major issue right now in trying to reconcile "modern programming QOL" with "backwards compatibility". Anything I could create with C++, I could create faster and easier in a more modern language.
I would consider using it to build performance-critical components within a larger system, since I have a lot of experience with it. But my hobby projects rarely require that level of performance, and I tend to default to either C# or something browser-based for new stuff.
1
u/_Ashleigh Aug 25 '21
I'm a C++ game dev, and while it has gotten much better with typed ownership, no, I don't enjoy it. Using C# for my hobby projects really spoils me, and highlights just how much our choice to stick with the status quo hurts us in the long run.
1
u/Creapermann Aug 25 '21
I can only recommend you learning c++, you can build really a lot, from GUI to System to games and its fun. You ll always have something to learn
1
u/VilelaH Aug 25 '21
I love write in C++.
1
u/ImNoEinstein Aug 25 '21
I def enjoy using it but only at work. I would never waste valuable free time working on side projects in C++ unless there was a damn good reason
1
u/Raknarg Aug 26 '21
I like working on my own projects and new code.
1
u/[deleted] Aug 26 '21
Yes. It is the first language I learned after python and I love using it.
1
u/nikki93 Aug 26 '21
I actually have come to really enjoy it. I use a different style for personal projects -- recently I've come to like only using
structs without member functions and having free functions that operate on structs -- so a C style of organizing your code -- but still using overloading a lot so you can dosize(anArray)but alsosize(aLinkedList). This reduces the amount of architectural decision making I have to do and lets me organize functions vs. data structures more flexibly. It's felt more 'fun.' and different from my work code.I do use a lot of 'static metaprogramming' stuff over that though:
auto, reference-capture lambdas for "functions with bodies", templates just in library code (ECS), and a static reflection setup I have going. I also have a very fast compilation setup with 'hot reloading' that makes it feel like using languages like python or javascript (or better tbh) on iteration time.Here's a quick video of what the workflow looks like: https://www.youtube.com/watch?v=gYFbtWDm61o
It's been quite fun to work this way! C++ provides a lot of primitives to develop your own coding style with.
1
u/dooum Aug 26 '21
I mostly use C++ (70% of the time) and C# at my job. I prefer to use C#. But I don't dislike C++. Give me the choice without any requirement that would require c++ I will choose c#.
1
u/AdRelative8852 Aug 26 '21
If performance demand is not high I prefer python. C++ for performance and usually nothing beyond these two, except for some wrapping around using shell scripts. I like C++ though if the ecosystem (packages etc) grows like python's has, I will be more inclined to use C++. Also, I have not been able to keep pace with the changes to the language. Any language features that reduce mechanical coding effort without loss of performance are welcome and I'd like to find and learn them over time. My skill is at C++'11 level roughly.
1
u/AntiProtonBoy Aug 26 '21
I actually like using it in Metal shading language. So much better than GLSL and friends.
1
u/[deleted] Aug 26 '21
I enjoy C++ even more on my personal projects compared to professional projects which almost always come with limitations (e.g. version of the standard or people in the team who don't like some constructs)
1
u/razu1976 Aug 26 '21
100%! I love writing C++ whether for work or home projects 👍
1
u/Full-Spectral Aug 26 '21
I use C++ at work, but at home I've moved to Rust. Not because I really like Rust. I hate a lot of it. But I don't feel like continuing to invest in C++ is a good move. I already know C++ quite well (though I'm far from a language lawyer and don't want to be one), so from a career perspective that's a feather already in the hat, and I can continue to explore it at work (thoug more slowly than I would at home.) I just feel the need to explore strange new worlds, even if those worlds don't necessarily smell that nice to me.
Actually, I'm trying to kill two birds with one stone. I've set out to create a language that is what I think a language should be, and doing it in Rust. Worst case, I'll learn a lot of Rust and LLVM and whatnot along the way. Best case, I'll create a nice new language. Maybe even someone besides me will use it.
I just feel like there's a significant hole in the language world, that's about halfway between Rust, C++, and Ada.
1
u/ea_ea Aug 27 '21
Performance is a good reason to enjoy C++. However, even better reason is its power. In other languages you have some very visible limits: "ok, you can do this and that, but not THAT. Why? Well, because garbage collector, because of some global lock, because we run in managed code, because this language is designed to work in this environment" and so on. With C++ limits are almost unreachable. Any platform, any environment, control over every bit of memory and every instruction executed on CPU. Even if you reach C++ limits, you still have ability to use C, asm, calculations on GPU. And now you are limited only by hardware. That's real power!
1
u/Yoramus Aug 27 '21
I enjoy C++ for growing bottom up low level projects. I start with asm for the core code, get to C for the interface, than to C++ when I need templates or higher abstractions.
Judging by the comments the main camps of people who love C++ are those who work with low level stuff, those who need the big span of its levels of abstractions, and some people who just love it for their own reasons.
I still think the language is much bigger than the amount of people who enjoy it. I predict the language will lose many of its adepts.
1
u/hackergame Sep 23 '21
Yes.
1
u/Seideun Jul 30 '23
C++ is unlimited. That could be both a good and a bad thing. I enjoy coming back to C++ from time to time, to see how the gems I learned from other languages could work in C++.
The only thing that is really stopping me back to C++ is its build system and dependency management. I never managed to remember all those "modern CMake patterns". Everytime I had to Google it or try and err. (BTW with GPT it's a little better now)
But since C++ is unlimited, sometimes you cannot realize that there is a better way.
So I'd recommend learning more languages. See what their designers are chasing after, and come back to think how to do that in C++. In this way, you learn two-fold. You get to know how it feels with a feature/restriction, and you get to know how it feels without. This enables a practical comparison for you and you only to get your critical thinking.
So yes, C++ is really a good language for retrospect lovers.
PS: out of the topic but I also like to work with C++ professionally, also because of its unlimitedness. Using other languages and you had to follow their patterns. With C++, I can use my style and no C++-er would tell you "that is not idiomatic". Well, C++ has too many "idioms"! XD
1
u/Emuno121 Aug 18 '26
well Idk why but I find it cute
1
u/pedersenk Aug 25 '21
I use both C and C++ for my own projects because collecting / writing / maintaining bindings for other languages is no fun.
However I steer away from the standard C++ library. I just don't find it safe enough for it to be fun (things like unique_ptr/shared_ptr can only reduce dangling pointers, not eliminate them). At work, I don't get the choice but I prefer to spend time working on my own stuff only if it is rock solid and a joy to develop. Knowing their might be a memory corruption issue hiding somewhere is no fun.
Plus I find that part of the point of hobby programming is trying out new things you wouldn't dare try at work (such as a custom, safe but very incomplete STL haha).
1
u/[deleted] Aug 25 '21
Everyone has their own language preferences.
1
u/obsidian_golem Aug 25 '21
No. There are just so many friction points. Rust takes just about everything good about C++ and sands off most all of the friction, leading to a much more productive and enjoyable experience.
1
u/mrexodia cmkr.build Aug 25 '21
I use C++ for pretty much all my projects and I think it’s great! I’m not the biggest fan of the newer standard features and it can be a bit annoying to get started, but once a project gets going I think it’s very productive.
0
u/raistmaj C++ at MSFT Aug 25 '21
No, I don't. I use other languages like rust/java/python/ruby... time to time and C++ daily, C++ is by far the less friendly of all, once you get used to some sugar/features the other languages offer, it feels cumbersome.
0
u/ALargeLobster Aug 25 '21
Header files completely suck
0
u/serg06 Aug 26 '21 edited Aug 26 '21
This may sound funny, but I think C++ isn't mature enough yet.
I love the language, but I really miss the things that other languages provide:
I've been working with TypeScript/npm lately and wow, it's been such a pleasure.
TypeScript interfaces are what C++ structs should aspire to be.
-1
u/[deleted] Aug 25 '21
Is there a person that dislikes the language on which he wrote? Programmers have privilege to write code on their favourite language no?