
Data Scientists: This Is Not Your Grandmother's C++ - ingve
http://phdp.github.io/posts/2016-06-28-not-your-grandmother-cpp.html
======
weberc2
I would love to write modern C++--the language looks remarkably usable;
however, the build system and tooling are still overwhelmingly bad (at least
for cross platform projects). When something like `cargo` or the `go` tool
appear (in the mainstream), give me a call. The build system is the deal
breaker for me, not the language.

~~~
Shorel
I've found this quite helpful:

[https://github.com/Akagi201/learning-
cmake](https://github.com/Akagi201/learning-cmake)

~~~
weberc2
I've used CMake + C++ for several years professionally. I know it well enough
to know that I don't want to use it if I don't have to. The other aspects of
C++ just aren't compelling enough to suffer CMake. In other words, even though
I already know C++ fairly well, I would rather abandon it entirely and start
fresh with Rust than "invest" more time into CMake. My hobby time is too
limited to spend it on frustrating tools.

~~~
Shorel
I just found all online documentation for CMake a bit incomplete, except for
this repository, particularly the PDFs.

But of course I understand your frustration.

------
filereaper
Wow Modern C++ is really different from old C++

The main issue comes up with compiler standards compatibility.

In the past with very large C++ projects, we've wanted to move towards newer
C++ programming idioms but cross platform compiler compatibility has held us
back. More specifically not all of these are on the same page when it comes to
standards compatibility to use these features:

\- GCC

\- MS VCC

\- xlC

\- Clang

Standards compatibility is one thing, good performance with standards
compatibility is another.

So unless you're only targeting a single platform, it'll be a while till
everyone has full support for modern C++.

In cases like these, Python, Java, Go or any other VM based language just
makes sense unless performance is absolutely paramount.

~~~
imh
With data analysis, performance can really help even when it isn't paramount.
If I am doing some exploratory analysis and it takes 20 minutes to run instead
of a couple seconds, I can iterate much, much faster. This is huge.

------
highd
That is good to know. I have enjoyed writing C++ in the past - I like the
clarity and forced obviousness of specifying whether you're talking about a
variable value or a pointer reference to it. When switching languages I always
have to remember which types and assignment operations duplicate values on
assignment vs just copy references.

Maybe I'm just bad at it, but one of the big things that keeps me from writing
more C and C++ is getting a dev environment setup, though I did find it a lot
easier once I left the Windows Visual Studio ecosystem (ambiguous missing
msvc103kd.dll error messages and the like) and drove gcc straight from the
command line in a Unix environment.

------
imh
I've been wanting to learn C++ (as a data scientist), but never know where to
start. There are so many books that were about modern c++ when they were
written, it's impossible for an outsider to know what's up to date. Is the
book the article mentioned a good one for learning modern C++?

~~~
phdpqc
[blog author here] I learned C++ a while ago so I never got to read an intro
to modern C++ cover-to-cover. However, a friend asked me to suggest a book and
this one seemed to both cover everything you need to understand the language
and provide several useful examples for scientific computing (e.g. there's a
nice example of gradient descent in the preface).

It's definitely not the only good option. "C++ Primer" is probably the most
popular introduction and the language's creator wrote an intro to programming
with C++ ("Programming: Principles and Practice Using C++"). They all cover
modern C++.

