News for hackers. Stuff that matters.
Re:I learnt C++ in 2018 and have no regrets by hellofunk on Monday January 07, 2019 @09:57AM (#18845591)
> 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!

Re:I learnt C++ in 2018 and have no regrets by mindcrime on Monday January 07, 2019 @11:25AM (#18846517)
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 by blub on Monday January 07, 2019 @10:14AM (#18845750)
What language can one say that they fully master?

I've been using Python since 2008-ish on and off for various scripting tasks and small tools, I can't say that I've "learned" it. They keep adding new stuff, some things I forgot, others I never needed.

I've been using C++ professionally since ~2006 and for similar reasons I won't say that I master it either. Metaprogramming is a clear weak point for me, but OTOH I find the whole exercise pointless and unpleasant. Unless one wants to be on the standards body, it's not really worth trying to learn C++ (or any other language) at 100% IMO.

Re:I learnt C++ in 2018 and have no regrets by imglorp on Monday January 07, 2019 @10:27AM (#18845850)
It's worth pointing out one measure of complexity: the Stroustrup book (4th ed) is 1376 pages, and that was 2013. Since then there's been how many layers more on top?

As a contrast, the description of Common Lisp syntax fits on a sticky note, but the library and semantics spec take about the same number of pages to describe a similar amount of functionality.

The two extremes represent different locations on the syntax-vs-library complexity tradeoff continuum.

Re:I learnt C++ in 2018 and have no regrets by TeMPOraL on Monday January 07, 2019 @10:39AM (#18845965)
> The two extremes represent different locations on the syntax-vs-library complexity tradeoff continuum.

I'd say it's a syntax x language semantics x libraries triangle. Common Lisp may have trivial syntax, but there are some hidden gems of complexity in the language semantics level. To this day I don't really understand eval-when, and I've been using Common Lisp for the past 9 years.

Re:I learnt C++ in 2018 and have no regrets by imglorp on Monday January 07, 2019 @01:30PM (#18848316)
Yeah that sounds about right. It's a 3 space.
Re:I learnt C++ in 2018 and have no regrets by javajosh on Monday January 07, 2019 @11:25AM (#18846503)
Mastery comes when you know most of the 1st order stuff and can even anticipate the stuff you don't know because you also know the 2nd order stuff. In Java this is easy because after you get proficiency you can really dig in and read the JVM Spec and the JLS(1), and you have lots of great, powerful tools available to examine the running JVM, bytecode, etc. In other languages, this is a lot harder. JavaScript (ES6) kinda sorta has a specification(2) but it didn't start out that way and the jsvm doesn't have one (AFAIK). The implementation and the tooling for JS is widely varying, and typically includes lots of non-JS stuff like the DOM and networking - which is (really!) great but lacks focus. Somehow lots of popular languages exist without specifications, like Python, Ruby, PHP, Markdown. This is, IMHO, a very serious drawback because to become a master of these languages requires that you become a master of the concrete interpreter implementation, which is easily an order-of-magnitude harder and less direct than reading a specification.

(1) https://docs.oracle.com/javase/specs/

(2) http://www.ecma-international.org/ecma-262/6.0/

Re:I learnt C++ in 2018 and have no regrets by chooseaname on Monday January 07, 2019 @10:20AM (#18845802)
> What language can one say that they fully master?

And does it really matter if you don't? No, not at all.

Re:I learnt C++ in 2018 and have no regrets by kace91 on Monday January 07, 2019 @10:44AM (#18846034)
>What language can one say that they fully master?

Incidentally, after working with node for a couple years near really knowledgeable coworkers, it's been the first time in my life as a developer that I feel I have a near complete understanding of the language I'm using.

Granted, most of that feeling probably comes from the small standard library (which is the root of several important issues, as we all know), and the feeling adds nothing to your life as a developer except for a vague sense of comfort, but it's still nice.

Re:I learnt C++ in 2018 and have no regrets by jononor on Monday January 07, 2019 @11:49AM (#18846827)
Sure, other languages are also hard to fully grok, and there are . But the consequences of not knowing (or misunderstanding) something in say Python is typically way less serious than in C++. This is not all due to language design though, C++ tends to be used in some domains that are more tricky. Like where there are real-time constraints, on constrained devices and unattended operation.
Re:I learnt C++ in 2018 and have no regrets by arandr0x on Monday January 07, 2019 @04:19PM (#18850233)
I'm like you! And after I argued with someone on another thread here and they told me to watch CppCon talks I realized there are plenty (and plenty of new C++ features) that are not about template metaprogramming and that are useful... won't learn it at 100% but the experience has made me feel like I could improve my C++ every day.
Re:I learnt C++ in 2018 and have no regrets by goatlover on Monday January 07, 2019 @10:53AM (#18846128)
But you don't hear people make the same sort of comments about languages like Go and Scheme. There's a continuation from complex to less complex and C++ is one one end of that.
Re:I learnt C++ in 2018 and have no regrets by pjmlp on Monday January 07, 2019 @03:47PM (#18849887)
No, I hear people complaining about writing boilerplate by hand (Go), not knowing with libraries to use, incompatibilities between libraries or political discussions about what the standard library should be (Scheme).
Re:I learnt C++ in 2018 and have no regrets by Skunkleton on Monday January 07, 2019 @04:44PM (#18850490)
Well crafted C++ is certainly lower on boilerplate than Go, but the other complaints apply to all languages.
Re:I learnt C++ in 2018 and have no regrets by Birch-san on Monday January 07, 2019 @11:00AM (#18846224)
how about Java? it's a small enough language that one can encounter and use every language feature within a few years of professional development, and without needing to work in any obscure domain.

admittedly, Java got a lot bigger in Java 8 and beyond. but it's still the language I'd put forward as "most possible to master".

Re:I learnt C++ in 2018 and have no regrets by stinos on Monday January 07, 2019 @10:10AM (#18845715)
Spot on really. I've been actively using it for more than a decade, including a good portion of the darker things, and still won't claim 'I learned it'. I did 'learn how to use it for the particular purpose of some projects' is what I'd say. Or in other words: I'm fairly good at C++ but from time to time there's still Q&A on reddit or stackoverflow that makes me go like 'whaaaaaat?'
Re:I learnt C++ in 2018 and have no regrets by nallerooth on Monday January 07, 2019 @10:13AM (#18845735)
My thought exactly. I know a few people who have been using C++ for several years who go "Oh, you can do that?" every now and then. I guess it's a blend of freedom of design and programmers being a little stuck in their ways of how a certain problem is solved.
Re:I learnt C++ in 2018 and have no regrets by Balero on Monday January 07, 2019 @10:40AM (#18845982)
I think I read somewhere Bjarne Stroustrup rated himself 7/10 at C++.
Re:I learnt C++ in 2018 and have no regrets by zwieback on Monday January 07, 2019 @11:28AM (#18846550)
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 by jf- on Monday January 07, 2019 @10:11AM (#18845723)
As an occasional and reluctant user of C++, this is my comment of the week.
Re:I learnt C++ in 2018 and have no regrets by nambit on Monday January 07, 2019 @02:14PM (#18848866)
Yup. That's when I stopped reading.