Isn’t c++ heavily used in financial industry and hedge funds
Yes... check out this repo: https://github.com/bloomberg/bde , a very powerful library developed by Bloomberg. A random example: https://bloomberg.github.io/bde-resources/doxygen/bde_api_pr...
Does C++ still deserve a bad rap?
231–240 of 310 posts
Re: Does C++ still deserve a bad rap?
#232Earlier quoted context omitted.
> There isn't any point of using C++ to count words in a text file. Any high-level language like Python will beat you to it. However, there's one thing you can do in C++ and not in Python or JavaScript or PHP: fully control the memory layout of your data. Any books or resources for digging deeper in these kinds of topics? I’m a Python developer and would like to learn C++ but the just the reasons you mentioned make i…
Python developer here just switched jobs to one that does C++. Let me warn you right now. It's not worth it. At all. Don't go down this path. Memory management is easy, but that's not the only crap you have to deal with. Templating and the whole C++ ecosystem with Cmake compiling to make is a giant headache. It takes about a week to integrate a new C++ library in source code and people are worried about installing or…
Re: Does C++ still deserve a bad rap?
#233Earlier quoted context omitted.
Wouldn't C be a better fit for these tasks?
Given people (including in these comments about string splitting) often complain about C++ not having "batteries included" for everything, surely C would be even worse in that regard...
Re: Does C++ still deserve a bad rap?
#234Earlier quoted context omitted.
To be fair, C++'s standard I/O library is really bad. There is probably an almost universal consensus in the C++ world that the locale library is the worst standard library, immediately followed by iostreams. For small programs that's annoying, although using libc IO is usually fine for them. However, C++ is probably one of the top 3 languages for developing large applications (Java would also be there, not sure whic…
In terms of large projects C++’s role is very much shrinking. C++’s last major strength is being cross platform, but new platforms keep excluding it. You can’t program on iOS or client side websites with it. Microsoft actively discourages using C++ on Windows, and C# took over for large projects. Essentially C++ and the modern ideas about computer security are at war.
Re: Does C++ still deserve a bad rap?
#235Earlier quoted context omitted.
> [...] fully control the memory layout of your data. Is that actually guaranteed by the standard? > * Try doing anything non-trivial on a microcontroller with 32KB of RAM. You could theoretically use a higher-level language, but you will end up using >10x amount of RAM. It's a shame Forth never took off. Sometimes I wonder what it would have been like to live in an alternate universe where Forth had been the lingua…
What is so good about forth?
You can go very low level, but it has better higher level abstraction capabilities than C.
It's also really weird, which fascinates me. Eg most Forth code doesn't use variable names.
I've toyed around with Forth a bit. But never used it in anger.
Wikipedia says that Forth is used today in some bootloaders and outer space. I suspect the latter is a historic accident, because the inventor of Forth worked on a big telescope.
See https://en.wikipedia.org/wiki/Forth_(programming_language)
Re: Does C++ still deserve a bad rap?
#236Earlier quoted context omitted.
100 years is a long time in technology. A safer bet would be to say "Assembler will be around in a 100 years". High level languages tend to get replaced after a while.
C++ has already been around for 36 years.
Re: Does C++ still deserve a bad rap?
#237As for the claim "As this program has only one thread, it can be formally proven to be thread safe": well, it is technically correct, but it just looks like a somewhat desperate attempt to make something out of nothing, when compared to, say, "thread safety is not an issue here."
Re: Does C++ still deserve a bad rap?
#238Like every programming language out there, C++ is a tool. And like every tool out there it has its uses. There isn't any point of using C++ to count words in a text file. Any high-level language like Python will beat you to it. However, there's one thing you can do in C++ and not in Python or JavaScript or PHP: fully control the memory layout of your data. While you don't need it in most of the cases, it becomes a ki…
> There isn't any point of using C++ to count words in a text file. Any high-level language like Python will beat you to it. However, there's one thing you can do in C++ and not in Python or JavaScript or PHP: fully control the memory layout of your data. Any books or resources for digging deeper in these kinds of topics? I’m a Python developer and would like to learn C++ but the just the reasons you mentioned make i…
Re: Does C++ still deserve a bad rap?
#239Earlier quoted context omitted.
Interesting how different experiences with the same thing can be! :) > it helps to have some people around who know what they are doing I think that's the crux of my issue. OCaml wasn't the easiest to start with either but it took me 2-3 casual evening sessions to just be able to sketch code and run it immediately with almost no hassle. But yeah, can't deny Haskell kind of rubbed me the wrong way so I am likely biase…
It does feel fun to bust out a few Project Euler challenges with OCaml; and as a reasonable experience programmer you should be able to do that after those 2-3 casual evening sessions. It's been a few years since I last did OCaml. At that point, the ecosystem was a bit more mature for Haskell. More libraries, better editor support, etc. In some platonic sense I like small languages, but I had come to appreciated all…
Re: Does C++ still deserve a bad rap?
#240Earlier quoted context omitted.
What is so good about forth?
It's rather simple, can easily run on bare metal (ie no OS). You can go very low level, but it has better higher level abstraction capabilities than C. It's also really weird, which fascinates me. Eg most Forth code doesn't use variable names. I've toyed around with Forth a bit. But never used it in anger. Wikipedia says that Forth is used today in some bootloaders and outer space. I suspect the latter is a historic…