Live data from Hacker News

C++11 and Boost - Succinct like Python

fendrich.se

81–90 of 172 posts

Re: C++11 and Boost - Succinct like Python

#81
post #13

The changes to C++ are too little, too late. These changes should have been made years ago, and C++ has lost momentum and credibility. Is anyone comparing Python to c++? nope, only the other way around.

C++ does not need the credibility. Hey, in what language is your Python compiler written in C/C++. When performance is the criteria C++ will shine. The world runs on C/C++, this comes from a C# developer.

Re: C++11 and Boost - Succinct like Python

#82
post #10

The only point that finds me in disagreement is the need for a code standard that decides well on which parts should be used and how . I don't understand: why limiting ourselves? Why choosing such a well-tested instrument and choosing NOT to use some of it?

Some parts exist either for backwards compatibility with existing code or to serve very narrow use-cases and should be used sparingly or not at all in new development.

There's also a ton of redundant libraries and language features, resulting in a lot of decisions being arbitrary choices between equivalents. Having the same decision made throughout the code makes everyone who has to read the code's life easier.

Re: C++11 and Boost - Succinct like Python

#83
In other words: C++11 boosts Python :-)

I think only a hardcore C++ developer would claim that the author's sample is "succinct". Honestly, C++11 is still far behind the easiness of Python (or Scheme), even with Boost.

Funny, a decade ago Ada 95 (the "military" language for high-critical applications) looked like a monstrous over-designed beast when compared to C++. Today Ada 2012 looks elegant and even "small" when compared to C++11. How times have changed :-)

Re: C++11 and Boost - Succinct like Python

#84

Earlier quoted context omitted.

But that's a completely different claim. I agree that C++11 is much nicer than old C++. I really like the improvements. I'd be glad to see that argument in his post instead. That's not what he wrote though. The title is "C++11 and Boost - Succinct Like Python", the contents say "almost as painless as in a modern dynamic language like Python". That's what I can't agree with. There's still lots of supporting syntax tha…

The extra syntax is not there for nothing. It's adding type information. Thus allowing error checking or dispatching by type or optimisations at compile time. It is a cost in terms of syntax and readability but it's not for nothing. So for correct programs the end result might be the same in terms of values. For buggy code and runtime speed that's not necessarily the case.

The extra code is there for a reason, but it's still there and it's not there in a language like Python.

Nobody would argue that C++11 code can be much cleaner than old C++ code. But to say it's almost as clean as Python goes to far, and isn't fooling anybody. So why not be satisfied beating old C++?

Re: C++11 and Boost - Succinct like Python

#85

Earlier quoted context omitted.

But that's a completely different claim. I agree that C++11 is much nicer than old C++. I really like the improvements. I'd be glad to see that argument in his post instead. That's not what he wrote though. The title is "C++11 and Boost - Succinct Like Python", the contents say "almost as painless as in a modern dynamic language like Python". That's what I can't agree with. There's still lots of supporting syntax tha…

The extra syntax is not there for nothing. It's adding type information. Thus allowing error checking or dispatching by type or optimisations at compile time. It is a cost in terms of syntax and readability but it's not for nothing. So for correct programs the end result might be the same in terms of values. For buggy code and runtime speed that's not necessarily the case.

that's not entirely true, take make_tuple for example, this doesn't add anything except verbosity (by comparison to Python)

Re: C++11 and Boost - Succinct like Python

#86

Earlier quoted context omitted.

But that's a completely different claim. I agree that C++11 is much nicer than old C++. I really like the improvements. I'd be glad to see that argument in his post instead. That's not what he wrote though. The title is "C++11 and Boost - Succinct Like Python", the contents say "almost as painless as in a modern dynamic language like Python". That's what I can't agree with. There's still lots of supporting syntax tha…

The extra syntax is not there for nothing. It's adding type information. Thus allowing error checking or dispatching by type or optimisations at compile time. It is a cost in terms of syntax and readability but it's not for nothing. So for correct programs the end result might be the same in terms of values. For buggy code and runtime speed that's not necessarily the case.

Yeah, I agree with the claim that this is not in the same realm of readability (seriously, just consider for 10 seconds what an at-scale C++11 codebase looks like versus a scaled up python code base. But I understand why they're different and I can't get enough of the statically typed kool-aid lately.

Re: C++11 and Boost - Succinct like Python

#87
post #80

I work with C++ daily and it still has many rough edges: * Horrible error messages * Even simple programs take ages to compile due to massive header files. LLVM/Clang help on both fronts but it's still quite difficult. D2 seems much more promising if you can do without the libraries.

[deleted]

Re: C++11 and Boost - Succinct like Python

#88
I hate to do it (who am I kidding, no I don't) but the battle in this thread for static typing, succinctness and an EASY language that is easy to wrap your head around... if those are things that make you happy to program in a language, please give Go a shot. Here, take 10 minutes: http://tour.golang.org

Re: C++11 and Boost - Succinct like Python

#89
post #56

Earlier quoted context omitted.

A true expert can solve the same problems That's true, but I think ignores the main problem with C++. I'd say I know about three times as many things about how C++ as I do about how Python works, but I still feel like I'm more of an expert in Python than C++ just because C++ is such a stupendously large language now.

To be fair, I think that's absolutely correct and tried to point it out. It's a legitimate reason for sane people to choose Python over C++. Nonetheless, the really are "true experts" in the world. These people tend to write most of the really important software, and they tend to work with each other on teams where "everyone" (or nearly so) is another expert. In those environments, I think a very strong case can be m…

I write a lot of C++ every day. I work with a lot of people that write C++ all day every day. I don't know anyone that would consider themselves an expert in C++. The language is just too big.

Re: C++11 and Boost - Succinct like Python

#90

Earlier quoted context omitted.

But that's a completely different claim. I agree that C++11 is much nicer than old C++. I really like the improvements. I'd be glad to see that argument in his post instead. That's not what he wrote though. The title is "C++11 and Boost - Succinct Like Python", the contents say "almost as painless as in a modern dynamic language like Python". That's what I can't agree with. There's still lots of supporting syntax tha…

The extra syntax is not there for nothing. It's adding type information. Thus allowing error checking or dispatching by type or optimisations at compile time. It is a cost in terms of syntax and readability but it's not for nothing. So for correct programs the end result might be the same in terms of values. For buggy code and runtime speed that's not necessarily the case.

And this is where I decide the language is too far developed on the wrong foundation.

I cannot put up with type systems that don't have complete or near-complete type inference. I don't know why one would start a new project in a language that didn't support Hindley-Milner.

Post reply on HN