Earlier quoted context omitted.
Any useful language is a freaking enormous ball of mud. Bjarne said: there are only two kinds of languages - the ones people complain about and the ones nobody uses.
I can not think of a cognitively bigger language than C++. And I mean language , not library set or anything like that, but literally, what the syntactic constructs are, how they are defined, and in particular how they end up interacting with each other. I often wonder how many of the C++ defenders could actually answer detailed questions about it, or how much of the code they write would actually deeply, deeply surp…
C++11 Makes Competitors Go Rusty
61–69 of 69 posts
Re: C++11 Makes Competitors Go Rusty
#62A couple of nitpicks: C++/Tr1 has also solved many of the same problems without needing a new compiler Not true. While many of the boost/tr1/c++0x features are introduced via new headers, there are many compiler-level changes, and that's why you need to use the latest versions of clang/g++/msvc/icc to take advantage of them. Things like r-value references just can't be done without a "new" compiler. My other nitpick…
I wonder if you are confusing TR1 (which came out several years ago), and C++11. TR1 was designed to not need compiler extensions (although some parts of type_traits, that AFAIK no-one ever used in the TR1 days, could be improved with compiler support). TR1 added regex and tuple among others. It certainly didn't have rvalue references. C++11 is the new big standard, which certainly requires large amounts of compiler…
Re: C++11 Makes Competitors Go Rusty
#63Earlier quoted context omitted.
Except the C++ dragon rears its head. How do you build an intelligent Maybe or Either type in C++? Should they be value types containing unions? You can’t use “non-trivial” types in unions till C++11, and a lot of people haven’t yet upgraded. Referential types with dynamic allocation? How do you transfer ownership? Are “Left” and “Right” subtypes of “Either”? It’s ridiculous.
The choices are clear for every situation you describe.
Re: C++11 Makes Competitors Go Rusty
#64I like and use C++. It fits my requirements of allowing high performance but still having rich abstractions. I also like most of the additions in C++11, and I look forward to using them. But, there is a valid argument for using a newer language that has nothing to do with the language itself: the ancient include, compile and link process. Having to do the #ifndef/#define/#endif dance in every header file I write is a…
> Having to do the #ifndef/#define/#endif dance in every header file I write I'm just using "#pragma once" in my current hobby C++ project. I understand pragmas are living in sin, but is there any reason I shouldn't use them?
Re: C++11 Makes Competitors Go Rusty
#65Earlier quoted context omitted.
I can not think of a cognitively bigger language than C++. And I mean language , not library set or anything like that, but literally, what the syntactic constructs are, how they are defined, and in particular how they end up interacting with each other. I often wonder how many of the C++ defenders could actually answer detailed questions about it, or how much of the code they write would actually deeply, deeply surp…
You can replace C++ with almost any other mainstream language in the above paragraph and it would still hold true. Problem is, contemporary general-purpose languages are used for such a wide range of different tasks that it is simply impossible for them not to be complex (syntactically or in terms of runtime envoronment). And yes you can hide complexity behind abstractions (which our programming languages successfull…
I don't like or use Java, and it isn't perfect by any means. My point is just how far I didn't have to go down the list of "mainstream languages" before your claim is completely false. C++ is an outlier.
C also has the memory leaking issue, but the rest is false as well. Though in the memory model case it's by virtue of not having one.
And that's sticking with a very generous-for-you interpretation of "mainstream". If I'm allowed to dip down to Python or something you're even worse off.
Re: C++11 Makes Competitors Go Rusty
#66Really, how can a tech person think this is a good idea of publishing content? Please fix it.
Re: C++11 Makes Competitors Go Rusty
#67Your freaking enormous ball of mud accreted some more mud. Quelle surprise . It's probably doing it by sheer gravitational attraction at this point. I do not think that removes the need for languages that have the capabilities of C++, yet aren't freaking enormous balls of mud. The reader may mentally replace my use of the word "freaking" with other choice terms at his or her discretion.
I agree. I think people who know C++ and people who do not know C++ will have very different attitudes toward the evolution of C++. I sunk a lot of effort into C++ when it was the best game in town for a lot of things, so I'm excited to see one of the sharpest tools in my toolbox get a little sharper. If you must write C++ code (or C code, since it's easier to write C++ instead) then by all means you should learn C++…
ACK. I know many languages, and my advice after using C++ for several years is: Don't dare try to do everything in C++. Use C++ only when it is absolutely necessary.
Just compare this C++ code
http://shootout.alioth.debian.org/u32/program.php?test=regex...
with this equivalent Javascript code to understand immediately what I mean:
http://shootout.alioth.debian.org/u32/benchmark.php?test=reg...
It's funny that this V8 code runs even 4.5 times faster (!) than C++ :)
http://shootout.alioth.debian.org/u32/performance.php?test=r...
Re: C++11 Makes Competitors Go Rusty
#68Earlier quoted context omitted.
You can replace C++ with almost any other mainstream language in the above paragraph and it would still hold true. Problem is, contemporary general-purpose languages are used for such a wide range of different tasks that it is simply impossible for them not to be complex (syntactically or in terms of runtime envoronment). And yes you can hide complexity behind abstractions (which our programming languages successfull…
I can write Java code that will not surprise me with unexpected copies, contain huge memory problems (GC does have edge cases, but if you throw that in I will throw in "non-trivial memory management in C++ when 'just use a smart pointer' doesn't work" and you don't come out ahead at all), or surprise me greatly with the memory model. It doesn't have a huge syntax, and the language doesn't get 50% bigger on every rele…
Re: C++11 Makes Competitors Go Rusty
#69I have fun when I write code with Go. I love the syntax, type inference and standard libraries. I wrote a transcoding video http server with html frontend in like a hundred lines of code and it doesn't make my eyes bleed. I don't think Go needs to replace C++ but I certainly prefer it. I think there are tons of uses for C++ still obviously (least of which is Go's GC-nature), but I don't think C++11 makes redundant th…
[1] http://stackoverflow.com/questions/3327676/what-language-is-...