Live data from Hacker News

I learnt C++ in 2018 and have no regrets

vishnubharathi.codes

91–100 of 259 posts

Re: I learnt C++ in 2018 and have no regrets

#91
> "I have to pay: First and main concern being that the standard study materials for reading about C++ are not free."

I don't think this is more than a minor issue. If you can't afford it, the book is very easy to obtain online for free, either through piracy or a paid / free trial Safari Books Online subscription. If you felt so inclined, you could pay for the book after making money with the C++ it taught you.

Re: I learnt C++ in 2018 and have no regrets

#92

> My quest for relearning C++ started in November 2018. That’s great! I’ve been using it since 2013 and still haven’t learned it!

I started learning C++ about 1993 or so, and I feel like I know less about it now than I did in 2001. Of course I haven't written a line of C++ in anger since about 2003, so there's been ~15 years of changes that I haven't kept up with. Part of me wants to dive in and really re-learn modern C++, but finding time is always the challenge.

Just for context, I was such a C++ bigot at one time that my car's license plate read C++HACKR and my personal website was on the cpphacker.org domain. But somehow I drifted into doing more Java and wound up mostly leaving the C++ world.

Edit: heck, this conversation triggered such a pang of nostalgia that I just re-registered cpphacker.org. Maybe I'll go back to having a personal website there. I've been thinking hard about setting up a new personal site and ditching Facebook anyway...

Re: I learnt C++ in 2018 and have no regrets

#93
post #77

I like that the author mentions the STL explicitly. The STL is one of the most beautiful libraries ever written. There are few language libraries that are as clear and well designed as the STL. Alex Stepanov is completely underrated outside the C++ community.

Some wouldn't agree: http://wiki.c2.com/?StlSucks

Personally, I find Scala standard library much easier to work with and at the same time much more flexible and powerful.

Re: I learnt C++ in 2018 and have no regrets

#94
post #22

Earlier quoted context omitted.

Things I'd rather be doing: * C++ * Lua .. .. [a thousand other things] .. .. * Node * Javascript __ bottom of the pile.. The Node/JS ecosystem is such a steaming pile of garbage, I can honestly see with great clarity why people should be running from it back into the arms of C++[11,17] ..

You shouldn't make broad statements like that. In my personal experience, I have found Javascript much easier than C++. If I want to install a package, I can just do "npm install Now, I'm sure some people have an easier time with Makefiles, but I've found it even easier to get up and running in Javascript. Most of the tools in Javascript (create-react-app, Webpack, etc.) are very user friendly, making setup trivial.…

Don't mistake easy with simple.

https://www.infoq.com/presentations/Simple-Made-Easy

JavaScript is a simple language that can be made extremely complicated via "simple" tooling. You can open the node_modules folder and see how sausages are made. :-)

C++ is dealing with essential complexities, there is no silver bullet:

https://en.m.wikipedia.org/wiki/No_Silver_Bullet

Re: I learnt C++ in 2018 and have no regrets

#95

> My quest for relearning C++ started in November 2018. That’s great! I’ve been using it since 2013 and still haven’t learned it!

Yeah, I've been using it since 1992 and am now thinking of "relearning" it as well, having drifted off into C# and Python. It'll be interesting to see how things that seem natural in those languages feel in modern C++.

Re: I learnt C++ in 2018 and have no regrets

#96
Similar experience here ... it took no time to learn c++ because it’s not the pre C11 language.

You can make whole applications without touching memory management with RAII patterns; and C++ APIs are usually not the Java OOP monstrosities everyone hates.

Operator overloading is just so damn useful . You can make very elegant APIs in C++ as a result.

Re: I learnt C++ in 2018 and have no regrets

#97

> Within C++ is a smaller, simpler, safer language struggling to get out.” - Bjarne Stroustrup Ah, yes. I think they called it "C".

I'm having some difficulty imagining that C is safer than C++.

Well, it is. Every f*up you can have in C, you can also have in C++.

Re: I learnt C++ in 2018 and have no regrets

#99

What's there to regret? For purely edification purposes, there isn't a better OOP language ( though it encompasses other paradigms as well and isn't purely OOP ) since it doesn't have training wheels. You could hurt yourself with it but it certainly allows you to explore and learn. Also, you could "learn" it in a year, but it takes you a lifetime to master it.

C++ is not very canonical OOP. And by that I don’t just mean it’s multi paradigm nature, but it’s realization of OOP features. Using C++ teaches you mostly about using C++ and doesn’t really transfer across the paradigm.

Hmm, not my experience. C++ was my intro to OOP but I was aware of "pure" OO languages like Smalltalk. I feel like my C++ OO experience has taught me a lot although I think it's valuable to study another OO language side-by-side. A lot of OO patterns translate between languages although the implementation in C++ is often overly concerned with static types.

Re: I learnt C++ in 2018 and have no regrets

#100
post #64

One can't just learn C++ in one year, imho.

I've been coding heavily in C++ for now over 2 decades, and when I interview someone I typically can get a pretty decent picture of within a general 3 - 5 year range of how long they've been coding based on the various details they gave when answering the questions about the language. And yes, of course someone could have 10 years experience, or the same experience for 10 years and never grow, but in general I found I am pretty spot on.

So I agree, 1 year doesn’t even begin to cut it. You need more than book knowledge, you need the experience of watching your masterpiece crumble under its own weight (sometimes several times) or have the joy of hunting some obscure bug because you failed to recognize the trap you had set for yourself.

I certainly wouldn't want to scare anyone off from C++, because personally I find the empowerment is worth the pain. It just takes time to learn what to avoid.

Post reply on HN