Hacker News new | ask | show | jobs
by fndrplayer13 3704 days ago
As a developer who used to build systems in embedded C++ and now spends all of my time building web backends in mostly Python, I have to agree with the premise that C++ is becoming more influenced by Python. That's a good thing, I think. I really think C++ is a wonderful language if properly curated and used by a responsible team of developers.

One tiny thing that would be cool to see built into C++ would be an equivalent to the Python range function. The boost version is nice for now, though.

Finally, I also see this as a nice compliment to Python and the power that it offers as a language.

4 comments

I do not think there was a single bit of a Python influence in C++ design. People behind these changes are all seasoned PL researchers and they have far better sources of inspiration than just a poor little Python.
"As a developer who used to build systems in embedded C++ and now spends all of my time building web backends"

I'm curious, what motivated your switch from embedded to web?

I loved being an embedded developer. Loved it. I had been out of college for 4 years and thought that the work at startups would be even more exciting. I took a job as a backend developer at my current company because I was really excited about the technology they were working on from a conceptual level, and I still am. I transitioned from working on computer vision/image processing embedded work to natural language generation stuff in AWS. The AI aspect just generally excited me, but so did expanding my skill set in a much wider sense. Today I can talk about embedded concepts all the way up to AWS concepts like lambdas, cloud formation, etc. That's a pretty cool breadth of skill (notice I didn't necessarily say depth :P). I still feel like an embedded developer at heart, though. I'll go back to it someday.
Thank you, interesting. I am curious because I've gone the other direction. I began in the latter 1980s on the IBM PC (literally with IBM). At IBM they gave us a PC, a copy of the Technical Reference Manuals, and a screwdriver. It was really fun to learn the machine literally from the metal upwards. Beyond the screwdriver was Macro Assembler and a C compiler. Avoiding reminiscence, the point is that over the ensuing years my career took me further and further up the stack into software only, from end-user applications to a long time in the server "backend" space. During those years I became ever decreasingly aware of the hardware and internals of the OS. Machines themselves became "virtual instances". Thus is the modern world of highly scalable, distributed 'net and [dread] enterprise computing, and it's all great and exciting in many ways -- but, for me I also felt that my heart was happiest when thinking of things at the lower level. That drove playing with embedded systems, which led ultimately to a complete career shift. All is good. And, yes, we are all so very fortunate to be in an economic segment (technology, hardware and software) that allows us such freedom to choose our paths (and then change them).
I wonder if all these languages features are really necessary. I used C++ during the first ten years of my career and what I missed the most were better standard library features and more third party libraries (we used to write everything ourselves).

Language features are nice to have, but I never really missed any specific feature. Almost every sort of syntactic simplification I wanted to achieve, I could do so with a function, class or a template.

It's not about necessity. It's about convenience. There's really not much you can't do with C++, the only question is how much effort it requires. These changes help reduce effort without sacrificing anything, spare it for minuscule amount of compile time. Besides, you can always use old syntax if you prefer.
Oh, you could totally implement eg range that fndrplayer13 is talking about as a library function.
See the range_v3 library, which is on it's way (albeit slowly) to becoming part of the C++ standard. It provides C++ versions of range, as well as most of the iterator combinators in the itertools library.