Re:The Time Needed to Write “Effective Modern C++”
by tragomaskhalos on Thursday April 23, 2015 @07:22AM
(#9425943)
Well many of those issues are inherited from C, and Stroustrup has stated that compatibility with C was an absolute prerequisite otherwise C++ would have been stillborn. Given its position now, it's impossible to say that he was wrong, although I wonder if certain things could have been tidied up that would only have compilation-failed really bad code (e.g. it annoys me that you can pass a floating point value where an integer is expected).
[ Parent
| on HN ]
Re:The Time Needed to Write “Effective Modern C++”
by AlexandrB on Thursday April 23, 2015 @08:50AM
(#9426293)
While that's true, a lot of the complexity is self-inflicted. C++ tries to define syntaxes for its features in a C style which cripples a lot of features in unnecessary ways. For example, classes being kinda like a C struct instead of a separate syntax altogether.
Honestly, even Objective-C is better in this regard because the Objective-C parts are well separated from the C parts instead of feeling wedged-in.
Re:The Time Needed to Write “Effective Modern C++”
by pmelendez on Thursday April 23, 2015 @09:37AM
(#9426545)
>Objective-C is better in this regard
I would argue that's "better". As a result, Objective-C feels like an alien language for a C programmer. Although to be fair I don't think a core C programmer would move to either C++ or Objective-C unless (s)he has to (iOS support or legacy code). I think it is the same reason why C++ developers are not moving to Go anytime soon.
Re:The Time Needed to Write “Effective Modern C++”
by jokoon on Friday April 24, 2015 @07:51AM
(#9432630)
I'd gladly move to a language that has the syntactic sugar of C++ (STL, lambdas, modules, and many other things) without the complexity (templates, inheritance, polymorphism).
Go and Rust seems to have weird syntax differences with C and I don't understand the utility of those. The go function syntax looks a little bit hairy.