1,365 karma · joined May 12, 2014
Unfortunately because it has been written a while ago it doesn't cover algebraic modeling languages and examples are in Excel which is not an adequate optimization or teaching tool (even XKCD has something to say about it in his webcomic https://xkcd.com/1667/).
Yes, that's one example. Also when debugging one usually uses small data sets. There are plenty of cases where runtime is short.
I think the problem is that Julia is somewhat vague on how it should be used. If it stated explicitly that it is intended to be used in MATLAB-like fashion with one long-running instance that would save people from trying to use it as Python or other dynamic language.
Starting a REPL or running a computation that doesn't take long time, adjusting parameters, re-running. Startup time may not be too big in absolute numbers but it's noticeable and adds up quickly especially if you start using more packages rather than toy programs that I used as an example.
The question of syntax is subjective of course. From the set {C-like, Python, MATLAB} I'd definitely like to see more influence of the first two and less from the last one.
printf("Local number: %" PRIdPTR "\n\n", someIntPtr);
which is quite unreadable to say the least. To address this issue I even wrote a small library (https://github.com/cppformat/cppformat) that allows you to write something like this instead: print("Local number: {}\n\n", someIntPtr);
It is written in C++ rather than C, because the latter doesn't have facilities (at least overloading is necessary) to implement such library.That was exactly my point.
> And I'd have to strongly disagree.
OK, let's agree to disagree.
I'm not talking about possibilities, but about libraries that are actually available and widely used.
> You might as well say the key to using C++ is to use Python or C instead.
And that might not be a bad idea. If you don't need the power of C++ or don't want to invest time in learning it, then you are better off using a simpler language such as Python, but probably not C for the reasons I pointed out earlier.
C++ is a complicated language, so I agree with your advice of using good learning resources and code review. I don't agree that the issues you mentioned are of the same level as the ones I was talking about. Missing a copy constructor is just not as big of a problem as, say, getting a segfault caused by misuse of varargs.
In fact "threading" in C++ is safer because of the availability of high-quality libraries providing task-based parallelism such as TBB, move semantics is used all the time in C albeit manually with pointer manipulation. It is true that not all of the features play well together, but it's nothing compared to the C pitfalls that I mentioned.
If you want to avoid dangerous interactions, don't overengineer your code, stick to the features you understand. This is true not only for C++, but for any language.