Earlier quoted context omitted.
My god c++ is atrocious.
C++ is hard. If one sticks to a strict subset it is a nice language. The problem is the code one didn't write. Even the STL is ugly to use. They are trying to fix the language by adding features but it's like Javascript, the old ugly ones are still part of the spec.
Help me sort out the meaning of “{}” as a constructor argument
31–40 of 181 posts
Re: Help me sort out the meaning of “{}” as a constructor argument
#32I've been programming professionally for over 20 years, most of it in C++. I really like developing fast code, and C++ used to be my favorite tool for the job. But the language complexity gets more insane with every revision. It's now at the point where Scott Freakin' Meyers can't figure out the interpretation of a short little chunk of code. I'm now actively looking for gigs in which I can develop high-performance c…
C++ was my next loved language after Turbo Pascal and I still like it.
Nowadays I use mostly JVM and .NET languages and after reading Meyers's latest book, and still following the standardization process, I have to agree with you.
On private projects I can control what gets used, but at company wide level, it is almost impossible to do so.
So one ends up with a gigantic C++ code base, many times just C with C++ compiler, with different meanings depending which ANSI version, compiler extensions and version are being used.
Considering most common companies don't follow code reviews or use static analysis tools, this just leads to quite some buggy code.
Re: Help me sort out the meaning of “{}” as a constructor argument
#33C++ FAQs are full of massively complex conundrums like this for problems you just don't get in other languages. I used to love learning all these highly specific C++ rules and playing language lawyer when I didn't know any better and thought it was a good use of learning time to become an expert. I've since moved on to languages that weren't full of problems like this that let you just get on with what you're meant t…
I think you mean aren't full of those problems yet. :)
There's a lot of nasty corners in C++ but almost all of them are because it effectively has 40 years of wild success. (I say 40 because C++ inherits C's baggage and success.)
It's totally reasonable to pick a younger language with fewer warts. Become an expert in it! Be productive! Ship lots of apps.
Then, one day, decades and several versions hence, you may find yourself now dealing with all of the warts that language has accrued over time. At this point, you're too invested in it to jump ship. The marginal cost of learning a new corner case is smaller than the cost to start over from scratch and learn 2046's new hot language.
Alas, expertise is hard. Everything you learn makes you better at X but slightly disincentivizes you to learn Y, which may not even exist yet.
Re: Help me sort out the meaning of “{}” as a constructor argument
#34I've been programming professionally for over 20 years, most of it in C++. I really like developing fast code, and C++ used to be my favorite tool for the job. But the language complexity gets more insane with every revision. It's now at the point where Scott Freakin' Meyers can't figure out the interpretation of a short little chunk of code. I'm now actively looking for gigs in which I can develop high-performance c…
Any sense of where the C++ refugees are heading? Rust? Go?
Since 2006, I only had one project where using C++ really mattered. A mix of Assembly and C++ was used for image codecs, which were just 5% of the whole application done in WPF.
On personal projects, I went back to it for portable code across Android and Windows Store, but now with Xamarin being part of Microsoft, I am using it for newer projects.
Re: Help me sort out the meaning of “{}” as a constructor argument
#35The article was very informative though. Thanks for sharing!
Re: Help me sort out the meaning of “{}” as a constructor argument
#36It seems to me C/C++ has always had problems. K&R C had weird stuff like char pointers used to point to anything. And modern C++ has odd complexities like what Scott's article illustrates. Was there ever a Goldilocks moment when C was just right ?
When I learned C in 1993, it seemed quite poor compared to my Turbo Pascal 6.0 type safety and respective language features.
Re: Help me sort out the meaning of “{}” as a constructor argument
#37It seems to me C/C++ has always had problems. K&R C had weird stuff like char pointers used to point to anything. And modern C++ has odd complexities like what Scott's article illustrates. Was there ever a Goldilocks moment when C was just right ?
C works great, as an alternate to assembler, to bootstrap unix up on meager, 80s style, hardware. Based on things like the shell tools and languages like awk (and other related descendants), I don't think even the unix creators meant for much application level work to be done in C, though, but by assembling components in higher level languages. Try telling that to The Management and all the macho/masochistic Real Pro…
https://www.bell-labs.com/usr/dmr/www/chist.html
Yet to this day, many still don't use any sort of static analysis tool.
Re: Help me sort out the meaning of “{}” as a constructor argument
#38C++ FAQs are full of massively complex conundrums like this for problems you just don't get in other languages. I used to love learning all these highly specific C++ rules and playing language lawyer when I didn't know any better and thought it was a good use of learning time to become an expert. I've since moved on to languages that weren't full of problems like this that let you just get on with what you're meant t…
> I've since moved on to languages that weren't full of problems like this I think you mean aren't full of those problems yet . :) There's a lot of nasty corners in C++ but almost all of them are because it effectively has 40 years of wild success. (I say 40 because C++ inherits C's baggage and success.) It's totally reasonable to pick a younger language with fewer warts. Become an expert in it! Be productive! Ship l…
What languages are getting even close to being as bad as C++ in this respect though? Java, Python and JavaScript have been around for a while now for example and they seem more opinionated in a way that stops too many warts from appearing.
C++ has undefined and compiler dependent behaviour in the core of its design which I think is the real problem. Its complexity just multiplies at an exponential rate as more features and undefined behaviour is introduced.
Re: Help me sort out the meaning of “{}” as a constructor argument
#39C++ FAQs are full of massively complex conundrums like this for problems you just don't get in other languages. I used to love learning all these highly specific C++ rules and playing language lawyer when I didn't know any better and thought it was a good use of learning time to become an expert. I've since moved on to languages that weren't full of problems like this that let you just get on with what you're meant t…
Re: Help me sort out the meaning of “{}” as a constructor argument
#40I've been programming professionally for over 20 years, most of it in C++. I really like developing fast code, and C++ used to be my favorite tool for the job. But the language complexity gets more insane with every revision. It's now at the point where Scott Freakin' Meyers can't figure out the interpretation of a short little chunk of code. I'm now actively looking for gigs in which I can develop high-performance c…
Same here, I will look at Scala Native, like Scala, but instead of JVM as the target platform, its using LLVM